I have a simple web app that includes a backend REST api built with NodeJS/Express running on my local machine. It has standard CRUD operations, frontend makes api calls to backend etc. nothing fancy. I want to host this on digital ocean. What is the easiest way to do this? I found this example but I’m not sure if this is all still required or is this old? Is NGINX required?
I also found this that is shorter, but I’m not sure if it is missing important parts:
https://www.digitalocean.com/community/tutorials/how-to-host-a-node-js-app-on-digital-ocean
Any help appreciated. I think at the very least I must create a database and a droplet. Anything else?
Thank you~
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!
Hey,
To deploy this on a Droplet you should be able to just follow the steps here:
This covers all of the required steps to have your Node.js app production ready on a Droplet.
With a Droplet, you will need Nginx in order to be able to configure an SSL certificate.
An alternative option here, is to use the DigitalOcean App Platform so that you would not have to do any server configuration and maintenance steps:
https://docs.digitalocean.com/products/app-platform/reference/buildpacks/nodejs/
- Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.