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

Generate dynamic CZML data using NodeJS
How to invoke/use the ranker ID from within the nodeJs code to call Retrieve & Rank API?
TypeError: from.pipe is not a function in gulp-pump
How to access the drive directory of local machine for file using nodejs
How to properly use “keywords” property in package.json?
Cloning private gitlab repository with Yeoman
issues deleting an image using Cloud Functions for Firebase and #google-cloud/storage
iterate over sub documents from mongodb in node js
Express static css not served
Mongo Update not working
angular not showing created object until I refresh page
apply listStyle to Prompts.text() in bot framework
How can I retrieve information from one collection into another collection in mongoose?
How to read with VueJs result from MongoDB
NodesJS SocketIO - How can I make sure websockets are being used?
Different sessionID after server restart express [duplicate]

Categories

HOME
videochat
neural-network
dll
sitecore8
rx-java
ruby-on-rails-4
firmware
wildfly
get
uwp-xaml
metal
uiviewcontroller
access-token
external
httpresponse
category
redactor
j
eventtrigger
pad
mysql-error-1064
sitefinity
workspace
entity-relationship
powerpoint-vba
ractivejs
uppaal
mahapps.metro
white
byte
inorder
required
ecore
transfer-function
tablet
android-debug
azure-virtual-machine
codeigniter-2
initializing
winrt-xaml
shieldui
sphero-api
oracle-ebs
model-driven
protactor
binary-image
jes
background-position
http-status-code-415
mosync
bandwidth
fluentbootstrap
lab-color-space
audio-player
rpath
windows-firewall-api
report-viewer2012
imshow
lzma
into-outfile
splash-screen
idiorm
mindbody
cmfctoolbar
cpanm
childviewcontroller
visual-studio-2010-sp1
voog
coderunner
review
sql-job
filefield
swift-protocols
casbah
out
bonsaijs
galera
bitmapimage
graphael
socketrocket
tiles2
delphiscript
icommand
amber-smalltalk
aspnet-regiis.exe
nservicebus3
launching-application
mfi
google-doodle
continuations
stack-unwinding
multiple-versions
white-box-testing
pvcs
o3d
release-builds

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile