Skip to content

Getting Started

  1. Create a project

    Run the interactive scaffolding CLI:

    Terminal window
    npm create lacis@latest

    You will be prompted for:

    • Project name — directory name for the new project
    • Platform — Node.js, Bun, Vercel, or Netlify
    • Validation library — Zod, Valibot, ArkType, or none
  2. Enter your project

    Terminal window
    cd my-app

    Your project looks like this (Node.js example):

    • Directorymy-app/
      • Directoryroutes/
        • index.ts
      • server.ts
      • package.json
      • tsconfig.json
  3. Start the dev server

    Terminal window
    npm run dev

    Your server is running at http://localhost:3000.

The scaffolded routes/index.ts exports HTTP method handlers:

import type { Request, Response } from "lacis";
export const GET = async (_req: Request, res: Response) => {
res.status(200).json({ message: "Hello from lacis!" });
};

Each file in routes/ maps to a URL path. Add a POST export to the same file, or create routes/users/index.ts for /users.

  • Routing — learn how file paths map to routes
  • Validation — add type-safe request validation with defineHandler