Compare commits

...

2 Commits

Author SHA1 Message Date
Jimmy 91551e711d Nodemon only watch server dir 2022-01-18 20:13:55 +13:00
Jimmy 22ee270d42 Add host and port envars 2022-01-18 20:13:20 +13:00
2 changed files with 3 additions and 2 deletions

View File

@ -6,7 +6,7 @@
"scripts": {
"build": "stencil build",
"dev": "stencil build --dev --watch",
"server": "nodemon server/index.js 0.0.0.0 3000",
"server": "nodemon --watch server server/index.js",
"start": "npm-run-all -p -r dev server",
"test": "stencil test --spec --e2e",
"test.watch": "stencil test --spec --e2e --watchAll",

View File

@ -3,8 +3,9 @@ require("dotenv").config()
const express = require('express');
const app = express();
app.use('/', express.static('./www'))
console.log(process.env.API_URL);
app.get('/apiurl', (req, res) => res.send(process.env.API_URL));
app.listen(3000, '0.0.0.0');
app.listen(process.env.PORT || 3000, process.env.HOST || 'localhost');