Prerequisites
- A Zerops account
- Basic knowledge of Node.js
Deploy Using a Recipe
The fastest way to get started is using our pre-configured recipe:Log in to Zerops
Navigate to app.zerops.io and sign in or create a new account.
Import the project
Click on Import a project and paste the following YAML configuration:This creates:
- A Node.js 20 service named “app”
- A PostgreSQL 16 database named “db”
- Automatic subdomain access for your app
Wait for deployment
Zerops will automatically:
- Create the project and services
- Clone the repository
- Build the application
- Deploy to production
Deploy Your Own Application
To deploy your own Node.js app:1. Create a Node.js Service
- Using GUI
- Using zCLI
- Go to your project dashboard
- Click Add new service
- Select Node.js
- Choose your version (18, 20, 22, or latest)
- Set a hostname (e.g., “app”)
- Configure auto-scaling settings
2. Add zerops.yaml to Your Repository
Create azerops.yaml file in your repository root:
3. Deploy Your Code
- From Git
- Using zCLI
In the Zerops GUI:
- Go to your service
- Click Deploy
- Select From Git
- Enter your repository URL
- Click Deploy
Connect to a Database
To connect your Node.js app to a PostgreSQL database:1. Add Database Service
Add to your project import YAML:2. Use Connection String
Zerops automatically provides connection details via environment variables:Services in the same project share a private network. Simply use the service hostname (e.g.,
db) to connect.Environment Variables
Set environment variables in your service:- Using GUI
- In zerops.yaml
- Go to your service settings
- Navigate to Environment Variables
- Add your variables
- Click Save
Next Steps
Configure Build Pipeline
Customize your build process with advanced options.
Setup Auto Scaling
Optimize resource usage with intelligent scaling.
Deployment Process
Learn about zero-downtime deployments.
Browse Examples
Explore more Node.js examples on GitHub.