This message is coming to you via a simple NodeJS application that's live on your Droplet! This droplet is all set up with NodeJS, PM2 for process management, and nginx.
This app is running at port 3000, and is being served to you by nginx, which has mapped port 3000 to be served as the root URI over HTTP (port 80) -- a technique known as a "reverse proxy." We'll be teaching you how to use this technique right here on this page. If you want to kick the tires right now, try some of these things:
/var/www/html/hello.jsand see the results live by calling
pm2 restart hello
pm2 listto see code scheduled to start at boot time
pm2 delete helloto stop running this script and
pm2 saveto stop it from running on Droplet boot
git cloneyour NodeJS code onto the droplet, anywhere you like
cdinto the directory where your NodeJS code lives, and install any dependencies. For example, if you have a
pm2 start <your-file>, then map the port your app runs on to an HTTP URL by running
nano /etc/nginx/sites-available/defaultand adding another
location. Use the existing entry for the port 3000 "hello" app as a basis.
sudo systemctl restart nginxto enable your new nginx config.
pm2 saveto schedule your code to run at launch.
There's a lot you'll want to do to make sure you're production-ready.
sudo ufw status, and make any changes you need. By default, only SSH/SFTP (port 22), HTTP (port 80), and HTTPS (port 443) are open. You can also disable this firewall by calling
sudo ufw disableand use a DigitalOcean cloud firewall instead, if you like (they're free).