Update stuff
This commit is contained in:
@@ -39,3 +39,13 @@ or
|
|||||||

|

|
||||||
|
|
||||||
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
|
||||||
|
```
|
||||||
@@ -33,5 +33,6 @@ app.get('/', (req, res) => {
|
|||||||
res.render('index.ejs')
|
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));
|
app.listen(port, () => console.log("Server is running on http://localhost:%i", port));
|
||||||
Reference in New Issue
Block a user