dotenv usage

This commit is contained in:
2020-03-03 14:49:52 +01:00
parent 70f4b4dc56
commit b539d9645b
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
BASE_URL=https://www.mydomain.com PORT=8080
+1 -1
View File
@@ -17,5 +17,5 @@ Production
``` ```
yarn install yarn install
yarn build yarn build
node dist/server/server.js node -r dotenv/config dist/server/server.js
``` ```
+1 -1
View File
@@ -14,6 +14,6 @@ app.use(webpackHotMiddleware(compiler));
server.applyMiddleware({ app }); server.applyMiddleware({ app });
app.listen(8080, () => { app.listen(process.env.PORT || 3000, () => {
console.log('Server started'); console.log('Server started');
}); });
+1 -1
View File
@@ -7,6 +7,6 @@ server.applyMiddleware({ app });
app.use(express.static('dist/web')); app.use(express.static('dist/web'));
app.listen(8080, () => { app.listen(process.env.PORT || 3000, () => {
console.log('Server started'); console.log('Server started');
}); });