ZZuro Docs

Init

Create a production-ready backend in 60 seconds

Init Command

Create a new Express.js + TypeScript project with security, logging, and environment validation pre-configured.


Quick Start

npx zuro-cli init
pnpm dlx zuro-cli init
bun x zuro-cli init

Interactive Setup

Project Name

  Tip: Leave blank to use current folder (hackathon-project)

? Project name (blank for current folder) ›
  • Leave blank → Uses current folder
  • Enter name → Creates new folder

Package Manager

? Package Manager? ›
❯ npm
  pnpm
  bun

Done!

cd my-project
npm run dev

Server runs at http://localhost:3000


What Gets Created

app.ts
server.ts
env.ts
logger.ts
.env
package.json
tsconfig.json
zuro.json

Generated Files


What's Included

FeatureLibraryDescription
FrameworkExpress.jsFast, minimal web framework
LanguageTypeScriptType safety out of the box
SecurityHelmetSecure HTTP headers
CORScorsCross-origin requests
LoggingPinoFast JSON logging
Env ValidationZodType-safe environment variables

Running Your Server

# Start development server (with hot reload)
npm run dev

# Build for production
npm run build

# Start production server
npm start

Test the health endpoint:

curl http://localhost:3000/health
# {"status":"ok","timestamp":"2024-01-01T00:00:00.000Z"}

Safety Check

If this directory already contains a non-Zuro project, init stops before writing files.

Use zuro-cli init in:

  • a fresh/empty directory, or
  • an existing project already managed by Zuro CLI.

Next Steps

On this page