Answer the question
In order to leave comments, you need to log in
How to properly deploy NodeJS+Express on VDS Ubuntu 16.04?
Hello everyone, there is VDS and there is a mean application, there is also a domain.
Installed node/mongo, connected to mongo via robo 3t everything is ok.
And then I don’t know what to do, in which folder should I upload the application (var / www?) To start it?
Well, in general, to work as on a local server.
Answer the question
In order to leave comments, you need to log in
To work on the server, you need installed nodejs and npm
.
If the project is in GIT, then clone your repository to any directory (Better in /var/www/example_name_project/)
If there are only project files, then copy them to any directory that I wrote above.
Next, at the root of the project, run npm install to install all the libraries described in package.json.
After installing all the libraries, start your project with the node start index.js command. It is better to use the forever
library so that it all works in the background, otherwise your project will crash when you close the terminal.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question