LLevelUp
0
← Back to topic

Deploy Node Apps

Node apps need a running process. A common setup is Nginx on public ports and Node on localhost.

Browser -> Nginx :443 -> Node app :3000

Deploy flow:

pnpm install --frozen-lockfile
pnpm build
sudo systemctl restart my-app

Environment variables should be injected through systemd, a secrets manager, or controlled env files with strict permissions.

WARNING

Do not commit production .env files to git.

Further Learning

  • “Node app systemd deploy” — process management
  • “Nginx reverse proxy Node app” — traffic routing
  • “environment variables production Node” — config handling