Answer the question
In order to leave comments, you need to log in
How to put an application written in nodejs on the server?
Goodnight. Wrote a small application in nodejs. How now to put all this business on the server. Newbie in nodejs, current started
Answer the question
In order to leave comments, you need to log in
The entire civilized world uses Ansible for these purposes. You write an Ansible
playbook that goes to the server, checks the turnip, builds the project and restarts the service. I understand that the answer is very lengthy, but DevOPS is a very situational thing, it all depends on your application.
Well for the first time try something like:
ssh vash-vds-name
git clone vasha-repa
cd vasha-repa
npm install
node server.js
Upload the application code to the server (using git or ftp). Then we launch the application through the process manager ( forever or pm2 ), which, in which case, will restart the program. It is possible and just through node, but it is fraught with unexpected falls of the application.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question