Deploying a Node.js Application
Setting Up Node.js Deployments
DeployHQ supports Node.js applications with built-in npm and yarn support.
Build Commands
Add your build commands to install dependencies and compile your application:
npm install
npm run build
Process Management
Use PM2 or systemd to manage your Node.js process on the server. Configure a post-deployment command to restart the process.
Environment Variables
Set your NODE_ENV and other variables in DeployHQ to keep sensitive configuration out of your repository.
Health Checks
Implement a health check endpoint and verify it responds correctly after deployment.