dotenv usage
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
BASE_URL=https://www.mydomain.com
|
||||
PORT=8080
|
||||
|
||||
@@ -17,5 +17,5 @@ Production
|
||||
```
|
||||
yarn install
|
||||
yarn build
|
||||
node dist/server/server.js
|
||||
node -r dotenv/config dist/server/server.js
|
||||
```
|
||||
|
||||
@@ -14,6 +14,6 @@ app.use(webpackHotMiddleware(compiler));
|
||||
|
||||
server.applyMiddleware({ app });
|
||||
|
||||
app.listen(8080, () => {
|
||||
app.listen(process.env.PORT || 3000, () => {
|
||||
console.log('Server started');
|
||||
});
|
||||
|
||||
@@ -7,6 +7,6 @@ server.applyMiddleware({ app });
|
||||
|
||||
app.use(express.static('dist/web'));
|
||||
|
||||
app.listen(8080, () => {
|
||||
app.listen(process.env.PORT || 3000, () => {
|
||||
console.log('Server started');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user