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

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).

Submit an answer

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

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: