Skip to content

Commit

Permalink
fix bugs host value
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandaDwiLaksono committed Jun 7, 2023
1 parent 65c7b8a commit 39928ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"start": "nodemon ./src/server.js",
"start-prod": "NODE_ENV=production node ./src/server.js",
"start-dev": "nodemon ./src/server.js",
"lint": "eslint ./src"
},
"keywords": [],
Expand Down
2 changes: 1 addition & 1 deletion src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const routes = require('./routes');
const init = async () => {
const server = Hapi.server({
port: 5000,
host: 'localhost',
host: process.env.NODE_ENV !== 'production' ? 'localhost' : '0.0.0.0',
routes: {
cors: {
origin: ['*'],
Expand Down

0 comments on commit 39928ef

Please sign in to comment.