Question

Trying to connect to a sails.js web-app running on a droplet

Posted March 27, 2018 1.1k views
Node.jsUbuntu 16.04

I’ve installed everything and successfully lifted the web server. Everything looks fine in the console. But when I try to connect in my browser to <droplet IP>:1337 - I don’t see the page running

info: Starting app…

info:
info: .-..-.
info:
info: Sails <| .-..-.
info: v0.12.14 |\
info: /|.\
info: / || \
info: ,’ |’ \
info: .-’.-==|/–’
info: `–’——-’
info: _

info: ___-_
info:
info: Server lifted in /web/test
info: To see your app, visit http://localhost:1337
info: To shut down Sails, press <CTRL> + C at any time.

debug: ——————————————————-
debug: :: Tue Mar 27 2018 08:00:14 GMT+0000 (UTC)

debug: Environment : development
debug: Port : 1337
debug: ——————————————————-

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.

×
2 answers

in the production environment, you can alter the port in the production.js file and then lift the server using sails lift --prod. It will start the server on the defined port.

also to make the sails process run continuously you can use the Forever or PM2.

hope this helps!

I figured this out, silly me. Changed the port to 80 and it connected.

Submit an Answer