Update stuff

This commit is contained in:
Dieter Blocher
2025-01-30 16:42:28 +00:00
parent 71e3adf351
commit b73e655e89
2 changed files with 13 additions and 2 deletions

View File

@@ -38,4 +38,14 @@ or
![alt text](./assets/start_node_server2.png)
the second method uses the [nodemon.json](../nodemon.json) to configure nodemon.
the second method uses the [nodemon.json](../nodemon.json) to configure nodemon.
# .env file
To have different behavior on your dev host, you cloud add an .env file.
Here are the key-values of an .evc file:
```bash
PORT = 3000
```

View File

@@ -33,5 +33,6 @@ app.get('/', (req, res) => {
res.render('index.ejs')
})
const port = process.env.PORT;
const port = process.env.PORT || 3000;;
app.listen(port, () => console.log("Server is running on http://localhost:%i", port));