ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
public key is stored in ~/.ssh/id_rsa.pub.
To access key: cat id_rsa.pub
To update: git pull
in EC2:
sudo yum install nginx
start nginx: sudo systemctl start nginx
or Enable Nginx to start on boot: sudo systemctl enable nginx
Configure Nginx: sudo nano /etc/nginx/conf.d/your-app.conf
server {
listen 80;
server_name your-app-domain.com;
location / {
proxy_pass http://127.0.0.1:your-node-app-port;
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;
}
}
npm install mongoose