Zerops
Preset: zerops
Zerops supports deploying both static and server-side rendered apps with a simple configuration file in your project root.
Starter templates
If you want to quckly get started with zerops and nitro you can use repositories zeropsio/recipe-nitro-nodejs and zeropsio/recipe-nitro-static starter templates.
Project setup
Projects and services can be added either through project add wizard or imported using zerops-project-import.yml.
project:
  name: nitro-app
services:
  - hostname: app
    type: nodejs@20
project:
  name: nitro-app
services:
  - hostname: app
    type: static
Then create a zerops.yml config in your project root:
zerops:
  - setup: app
    build:
      base: nodejs@20
      envVariables:
        SERVER_PRESET: zerops
      buildCommands:
        - pnpm i
        - pnpm run build
      deployFiles:
        - .output
        - package.json
        - node_modules
    run:
      base: nodejs@20
      ports:
        - port: 3000
          httpSupport: true
      start: node .output/server/index.mjs
zerops:
  - setup: app
    build:
      base: nodejs@20
      envVariables:
        SERVER_PRESET: zerops-static
      buildCommands:
        - pnpm i
        - pnpm build
      deployFiles:
        - .zerops/output/static/~
    run:
      base: static
Now you can trigger the build & deploy pipeline using the Zerops CLI or by connecting the app service with your GitHub / GitLab repository from inside the service detail.
Build and deploy
Open Settings > Access Token Management in the Zerops app and generate a new access token.
Log in using your access token with the following command:
npx @zerops/zcli login <token>
yarn dlx @zerops/zcli login <token>
pnpm dlx @zerops/zcli login <token>
bunx @zerops/zcli login <token>
deno run -A npm:@zerops/zcli login <token>
Navigate to the root of your app (where zerops.yml is located) and run the following command to trigger the deploy:
npx @zerops/zcli push
yarn dlx @zerops/zcli push
pnpm dlx @zerops/zcli push
bunx @zerops/zcli push
deno run -A npm:@zerops/zcli push
Your code can be deployed automatically on each commit or a new tag by connecting the service with your GitHub / GitLab repository. This connection can be set up in the service detail.