Skip to content

Commit f461906

Browse files
committed
How to run
1 parent d8c7aa7 commit f461906

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ menu and select the file. Then double-click on the certificate and select always
88
- Linux: Depending on your Linux distribution, you can use `trust`, `update-ca-certificates` or another command to mark
99
the generated root certificate as trusted.
1010

11+
### Run
12+
1. Edit [server.js](server.js):
13+
- serve static files with `app.use(express.static('<path-to-serve>'))`
14+
- use express as backend, i.e.: `app.get('/', (req, res) => res.send('Hello World!'))`
15+
2. Install dependency with `npm install`
16+
3. Run with `sudo npm start` or `sudo node serve.js` (root required to use port 443)
17+
1118
### License
1219
[AGPL-3.0](LICENSE)
1320

server.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@ const certOptions = {
99
}
1010

1111
const app = express()
12-
https.createServer(certOptions, app).listen(443)
13-
14-
app.use(express.static('<path-to-serve>'))
12+
https.createServer(certOptions, app).listen(443)

0 commit comments

Comments
 (0)