Deploying rest api based node application with nginx

May 21, 2015 2.5k views
Node.js Deployment Nginx Caching

we wanted to know the best way to deploy our app in digitalocean..

The structure of our app is restapi based where the front end and backend is completely seperated from each other.

Our git repo has two main folders-
1) backend (all the api code with sails.js framework, with its own package.json)
2) frontend (all the frontend code.. angular with its own package.json)

So what we intend is to have nginx on top of node servers
1) where any call to serve static file will be directed towards frontend folder and nginx (and NOT node )being multithreaded will better serve static files
2) any restful call (like starting with /api/*) will go though the node server

Related to that I have 2 questions..
1) Does digital ocean provides a configuration like this..
2) If yes .. than in the case of increasing the servers, will we have to manually go in and change the number of upstream servers in nginx conf


Be the first one to answer this question.