node.js


Access node app on digital ocean - This site can't be reached


I am unable to access my digital ocean node js app. I've already SSH'ed in, cloned my Node app from Git, npm installed, and successfully started the app on the droplet, yet I get error
This site can't be reached
Digital Ocean docs say you can access your publicly facing website simply by going to <your website's ip>:<port>:
I did this by going to 67.205.185.63:9000/ (my app is running on port 9000 as you can see):
root#nodejs-512mb-nyc1-01:~/demos# npm start
live-demos#1.0.0 start /root/demos
node app.js
Demos is listening on port 9000
How else should I be accessing my node app?
var express = require('express');
var bodyParser = require('body-parser');
var app = express();
var port = process.env.PORT || 9000;
...
app.listen(port, function () {
console.log('Demos is listening on port ' + port);
});
Some Digital Ocean droplets (mainly one-click apps) come with ufw firewall installed and by default all ports except for 22, 80, and 443 are blocked.
To check if ufw is installed and which ports are blocked/open do:
sudo ufw status
Output:
To Action From
-- ------ ----
22 LIMIT Anywhere
80 ALLOW Anywhere
443 ALLOW Anywhere
22 (v6) LIMIT Anywhere (v6)
80 (v6) ALLOW Anywhere (v6)
443 (v6) ALLOW Anywhere (v6)
To allow traffic on port 9000 do:
sudo ufw allow 9000/tcp

Related Links

node.js express generator app not responding
Node.js use variable inside js
Node.js ibm_db installation error on CentOS
Node domains on Azure Mobile Services
NodeJS cluster global variable
How to create href links in a view, pointing to Express routes?
List All Data Sent to View
Request becomes “undefined” when it is itearated
How to get event details in middleware for socket.io
Deployment of a MEAN stack full app to Heroku
node js scheduler it definite time with agenda
mongoose error node_modules error mongodb
Unable to create HTTPS server with node.js
Node.js app H10 deployment error on Heroku
ORM Bookshelf + postgresql or MongoDB database in nodejs?
Why is my express.js not piping to my backend server port?

Categories

HOME
github
google-analytics
java-ee
sails.js
raster
ruby-on-rails-4
alexa
informix
sharppcap
get
node-red
integration-testing
castle-windsor
filesystems
login
wlan
64bit
graphviz
javacard
css-modules
ieee-754
bpm
unity3d-unet
axon
codecvt
twitter-streaming-api
intercept
react-apollo
gnome
frama-c
ebcdic
ext4
postgresql-8.3
pgadmin
wasapi
modeling
python-tesseract
ggiraph
vim-syntax-highlighting
opensaml
crawler4j
asn.1
lightgallery
webex
redhat-bpm
cachemanager
moa
cartography
cakephp-2.x
react-d3
terminal-emulator
webpack-style-loader
icingaweb2
google-keep
gyp
nslog
self-referencing-table
imshow
unicorn
ubuntu-15.10
qtquick2
ratchet
testdroid
openoffice-writer
reducers
oql
highcharts-ng
data-connections
ionic-view
stl-format
irs
traffic-simulation
ooyala
youtube-javascript-api
assignment-operator
tstringgrid
apache-commons
sin
github-linguist
typescript1.7
soundex
event-loop
maven-site-plugin
geographical-information
curator
teamsite
mongodb-indexes
println
google-email-settings-api
gideros
backbone-forms
readelf
operational-transform
grit
utl-file
dvorak
html-validation
generic-list
launching-application
webarchive
ant4eclipse
language-theory
testing-strategies

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App