Loading…
Notes
Environment variables
Both handlers already read SECRET and PORT from process.env with a hardcoded fallback — set them via a .env file (with dotenv) or your process manager's env config rather than relying on the fallback value in production.
PM2 setup
pm2 start ecosystem.config.js picks up the config above; pm2 startup && pm2 save makes it survive a reboot. pm2 logs / pm2 monit cover day-to-day monitoring.
Docker deployment
A minimal image is a node:18-alpine base, npm ci --production, and CMD ["node", "index.js"] — no Dockerfile ships in this package since the deployment target varies too much to standardize, but that's the whole shape of it.
Nginx reverse proxy
A basic proxy_pass to localhost:3000 with Host and X-Real-IP headers forwarded is enough to put this behind a domain — GitHub doesn't need to see the raw port.
Systemd service (PM2 alternative)
If you'd rather not run PM2, a simple unit file (Type=simple, ExecStart pointing at node, Restart=on-failure) keeps this running persistently on a Linux host — enable it once with systemctl enable and it survives reboots.