matt9292
matt9292

Reputation: 411

Why does Hapi not listen on a port?

I have a new DigitalOcean Droplet, and have followed this tutorial to install Node: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-18-04

I create a test application in index.js as per the tutorial above, listening on port 3001 and got the "Hello World" response.

Running netstat -plant shows this:

tcp 0 0 127.0.0.1:3001 0.0.0.0:* LISTEN 19655/node /home/ma

Then I follow this tutorial to install Hapi: https://hapi.dev/tutorials/gettingstarted/?lang=en_US

I replace the code in my index.js file with the example code in the above link. But I get a 502 Bad Gateway and port 3001 doesn't show in netstat -plant. Why isn't Hapi listening on port 3001?

Upvotes: 0

Views: 204

Answers (1)

matt9292
matt9292

Reputation: 411

After wrestling with this for a while I gave up and reset the droplet, no issues. Suspect I made some errors in the setup of node.

Upvotes: 0

Related Questions