Question

How to deploy a NodeJS/Express REST API on digital ocean?

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?

https://coderrocketfuel.com/article/create-and-deploy-an-express-rest-api-to-a-digitalocean-server#set-up-nginx-as-a-reverse-proxy

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~


Submit an answer
Answer a question...

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!

Sign In or Sign Up to Answer