![]() ![]() Review your firewall settings by calling sudo ufw status, and make any changes you need.Set up a non-root user for day-to-day use.There's a lot you'll want to do to make sure you're production-ready. Build out the URL directory structure you need by mapping applications to URL paths that's the reverse proxy method in a nutshell! Get production-ready ![]() Repeat these steps for any other NodeJS apps that need to run concurrently - schedule them to run at boot time on whatever internal port you like using PM2, then map that port to an HTTP/HTTPS URL in the nginx config.Call pm2 save to schedule your code to run at launch.Call sudo systemctl restart nginx to enable your new nginx config.Use the existing entry for the port 3000 "hello" app as a basis. Launch your app by calling pm2 start, then map the port your app runs on to an HTTP URL by running nano /etc/nginx/sites-available/default and adding another location.For example, if you have a package.json file, run npm install. cd into the directory where your NodeJS code lives, and install any dependencies.Note: If you're not using a source control, you can directly upload the files to your droplet using SFTP. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |