S
S
shane892015-12-28 21:49:05
JavaScript
shane89, 2015-12-28 21:49:05

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

3 answer(s)
A
Aitem, 2015-12-28
@Aitem

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.

S
samizdam, 2015-12-28
@samizdam

Well for the first time try something like:

ssh vash-vds-name
git clone vasha-repa
cd vasha-repa
npm install
node server.js

A lot depends on the application and the server. Looking at what opportunities and needs. Maybe docker, maybe some heroku you need, who knows.

A
Artur Atnagulov, 2016-01-07
@atnartur

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 question

Ask a Question

731 491 924 answers to any question