7

I am trying to run this app https://github.com/nheidloff/conversation-optimizer-for-ibm-watson It is running only on 127.0.0.1

# netstat -plnt                    │
Active Internet connections (only servers)                                                                  │
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name            │
tcp        0      0 127.0.0.1:6001          0.0.0.0:*               LISTEN      411/node

How do I make it run on 0.0.0.0? I tried reading the code but since I am not a programmer I am unable to makeout what to change so posting the git URL above.

3

1 Answer 1

2

This is in /config/webpack.prod.js:

const ENV = process.env.NODE_ENV = process.env.ENV = 'production';
const HOST = process.env.HOST || 'localhost';
const PORT = process.env.PORT || 8080;

and this is in /config/webpack.dev.js:

const ENV = process.env.ENV = process.env.NODE_ENV = 'development';
const HOST = process.env.HOST || '0.0.0.0';
const PORT = process.env.PORT || 3000;

So if it is usinf localhost instead of 0.0.0.0, the app is using production config. To set it to use development config, run: webpack --env dev

2
  • @Siju George does this help?
    – SanSolo
    Commented Dec 14, 2018 at 14:27
  • I am unable to use webpack because there are dependency problems in installing webpack-dev-server. I run it with the following commands. # cd conversation-optimizer-for-ibm-watson # npm install # typings install # npm run build:prod # cd node # npm install # node server-local.js Commented Dec 15, 2018 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.