Skip to content

Commit 177e6d4

Browse files
committed
server-ssl.js
detect if node.js is already installed /root │ ├── /error │ ├── 404.html │ └── 500.html │ ├── /ssl │ ├── /openssl │ ├── /acme │ │ ├── /crypt │ │ ├── /jose │ │ └── lets-encrypt-acme-client.js │ │ │ ├── private-key.pem │ └── certificate.pem │ └── ssl.js │ ├── /website │ └── index.html <---- Your website goes here │ ├── server-ssl.js <--- server config └── start-windows.bat
1 parent 82c6e0d commit 177e6d4

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ The certificates will be changed automatically when they are updated, you don't
8585
At the end of the day, this is just a [`Node.js`](https://nodejs.org/docs/latest/api/) server that sets up `SSL` automatically
8686

8787
```
88-
const HTTPS_SERVER = createServerHTTPS(S_SSL.loadDefaultSecureContext(), (req, res) => {
88+
const HTTPS_SERVER = createServerHTTPS(STATE.loadDefaultSecureContext(), (req, res) => {
8989
// do whatever you like
90-
}).on('error', (e) => e.code === S_SSL.ADDR_IN_USE && console.error(`${S_SSL.optPort}${S_SSL.IN_USE}`)).listen(S_SSL.optPort, (err) => err ? console.error(S_SSL.ERROR_STARTING, err) : console.log(`${S_SSL.STARTED_HTTPS}${S_SSL.optPort}`));
90+
})...
9191
```
9292

9393
You can remove everything inside `HTTPS_SERVER` and do whatever you like.
9494

95-
There are also helpers you can use in `S_SSL`
95+
There are also helpers you can use in `STATE`
9696

9797
> [!NOTE]
9898
> If you don't already have [`Node.js`](https://nodejs.org/en) installed then `start-windows.bat` will download the latest version of `node.exe` to the root folder

0 commit comments

Comments
 (0)