Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
From what I’m reading elsewhere, PM2 has been made rather redundant due to the presence of systemd on these newer linux distros. See http://stackoverflow.com/questions/4018154/node-js-as-a-background-service
I’m hung up on running the Hello World app. I keep getting the error:
./hello.js: line 1: syntax error near unexpected token `('
./hello.js: line 1: `var http = require('http');'
I’ve tried inputting the code using nano and vi; and I’ve tried typing it and copy/pasting it, always deleting hello.js between attempts.
Any clues?
This comment has been deleted
I was on an nginx Odyssey that could have been avoided if the code snippet for /etc/nginx/sites-enabled/default under Configure Nginx for HTTPS showed it being wrapped in http { }. This was certainly a very rookie mistake, but that’s why I’m here in the first place. :) It’s all up and running now!
For people searching, the error I was getting was nginx: [emerg] "server" directive is not allowed here in /etc/nginx/nginx.conf
using nvm + 16.04 + node 4.4.5 and running
pm2 startup ubuntu
and when i restart it it doesn’t load up the hello.js process…
help!
This is great. Do you have a tutorial on setting up passport to allow social logins. Most importantly, an explaination of how to ensure that site content isn’t accessible without logging in. I’ve tried this but seem to be missing the point of callback URIs. Also it seems that most tutorials out there don’t cover where to put your app on your server. I assume it doesn’t matter.
I see that in this guide you put both the reverse proxy as well as the node server on one droplet. In the 14.04 guide, they used a separate droplet for the reverse proxy and a separate droplet for the node.js app.
Could you explain the rationale a bit behind when and why it would be good to host these servers on separate droplets? For example, at what point would it start to make sense to look at using the nginx server as a load balancer and have multiple app droplets running in parallel?
I’m trying to decide if we need multiple separate droplets for DB, app, nginx etc. or if we can get by with just one droplet for all three services at this stage.
Why is the reverse proxy necessary or desirable? Can’t you just let node serve the app directly? Does using a proxy interfere with socket.io communication between server/client?
Hey, just found an error:
The “server_name” line needs to appear in the HTTP block, not the HTTPS block.
Placing it in the first block produces perfect results.
Phenomenal walk through, Digital Ocean puts it down.