A proxy is needed to hide secrets from the frontend.
Use nvm to install the last LTS node version.
nvm install --lts
git clone https://github.com/trouver-une-fresque/trouver-une-fresque-proxy ~/trouverunefresque
cp .env.dist .env
vim .env
npm i
Run the backend script using PM2.
npm i -g pm2
pm2 startup
pm2 start backend.js
pm2 save
curl localhost:8000/events
cd /etc/nginx/conf.d
nano trouverunefresque.conf
sudo nginx -t
sudo nginx -s reload
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx
sudo nginx -t