This video will show you excatly how to deploy your NodeJS API on any VPS. For this tutorial we will be using Linode Ubuntu VPS to deploy our API and make it live on the internet. We will be setting a this API with SSL from Let's Encrypt and reverse proxy with Nginx.
Hope you enjoy this tutorial if you did please remember to LIKE and SUBSCRIBE if you haven't already😎👍
List of commands used in tutorial:
============================
touch
cd
ls
ssh-keygen -t rsa
apt-get update
apt-get upgrade
apt-get install npm
npm i -g n
n install lts
apt-get install nginx
nginx -t
systemctl restart nginx
Nginx location block code:
======================
location / {
proxy_pass [ Ссылка ];
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
Basic API Github Link:
==================
[ Ссылка ]
Linode Link:
==========
[ Ссылка ]
Certbot Commands:
=================
[ Ссылка ]
Hardening up server even more:
==========================
[ Ссылка ]
Timestamps:
===========
00:00 Intro
02:21 Building Basic Express API
07:14 Setting up VPS with Linode
12:18 Login into server & updating
14:51 Installing Node and Npm
19:12 Copy project to server
30:10 Setting up PM2
34:02 Setting up Reverse Proxy with Nginx
44:00 Adding Server Firewalls
45:46 Setting up domain name and SSL
54:22 Outro
My website link:
=============
[ Ссылка ]
Ещё видео!