Report this

What is the reason for this report?

Upload existing Node.js (with Express js) app to CentOS 7 server

Posted on February 2, 2015

I have an existing Express.js project that I would like to upload and run on my CentOS 7 server. Does anyone know how to do that? I have completed all the CentOS setup steps, installed Node.js, Express.js, the project is on Git, I have my domain pointed to the Digital Ocean name servers, I just need to upload the app and tell it to run (forever).



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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

As you are already maintaining your code in Git, using Git is probably the best to handle deployment as well. You can set up a repository on the server and a post-receive hook to restart the app or any other steps you need to run on the server. This way you can simply git push your app to the server. This article should get you pointed in the right direction:

This one will give you a bit more background on using Git hooks:

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.