Installation
Installation Guide
sudo apt update && sudo apt upgrade -ycurl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
sudo apt install -y build-essentialLast updated
sudo apt update && sudo apt upgrade -ycurl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt install -y nodejs
sudo apt install -y build-essentialLast updated
sudo apt install -y nginx
sudo systemctl enable nginx
sudo systemctl start nginxmkdir -p /var/www/pastify
cd /var/wwwMONGODB_URI=MONGODB_ATLAS_URL_HERE
PORT=3000
ADMIN_USERNAME=your_admin_username
ADMIN_PASSWORD=your_secure_password
SESSION_SECRET=your_random_session_secretsudo nano /etc/nginx/sites-available/pastifyserver {
listen 80;
server_name your-domain.com;
location / {
proxy_pass http://localhost:3000;
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;
}
}sudo ln -s /etc/nginx/sites-available/pastify /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginxsudo npm install -g pm2cd /var/www/pastify
pm2 start server/server.js --name "pastify"pm2 startup
pm2 save