Node+Express+Mongoose+Pug project starts in console but connection refused in browser

Posted October 24, 2017 3k views
MongoDBNode.jsUbuntu 16.04

I have a Node+Express+Mongoose+Pug app that runs on port 8080.
When I run node app.js I get the following output:

 node app.js 
(node:26789) DeprecationWarning: `open()` is deprecated in mongoose >= 4.11.0, use `openUri()` instead, or set the `useMongoClient` option if using `connect()` or `createConnection()`. See
Express app listening on port 8080
(node:26789) DeprecationWarning: `ensureIndex()` is deprecated in Mongoose >= 4.12.0, use `createIndex()` instead

So the app starts on port 8080 but when I type the droplet ip followed by the port in the browser, I get :

This site can’t be reached

*IP goes here* refused to connect.

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Same issue here, app running Well on ssh but stuck with browser