Delpoying nodejs app [timeweb edition]

Delpoying nodejs app [timeweb edition]

ilyosme

Hi It is me again. For the first time you are reading my post two times in a row. I appreciate it.

So today, I want to help some of my nodejs developer friends who are struggling to deploy their app on vds. 

In this case i am going to show you using services of timeweb.ru

Let`s say you have everything set up already. For example for managing your server you have used vestacp and ubuntu. 

When we add domain name to our server, it creates some kinds of configuration files for us. 

First of all connect to your server using ssh.  

Then write this to your command line: 

cd ../home/admin/conf/web //here is your apps are stored
// now 
mc //it will open smth like totalCommander if you remember it

and there are domain names with some suffixes like 

.nginx.conf, .nginx.ssl.conf


So now we need to modify these two files:

pres f4 on files that you need to edit.

look at image 1 and make sure your domain.nginx.conf file looks like it 

and domain.nginx.ssl.conf to image 2

image 1


image 2


after that restart your nginx with this command:

sudo systemctl restart nginx


look at the images i tried to remove my ip there, that`s what you are going to change. Replace it with your ip. And using pm2 start your project make you give the app right port. If you look at mine i run it on port 4000.

enjoy.

PS: if your have problems, you alway ask me. I am ready to help you.

Ilyos Olimov

Report Page