Getting Started
-
Create a project
Run the interactive scaffolding CLI:
Terminal window npm create lacis@latestYou 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
-
Enter your project
Terminal window cd my-appYour project looks like this (Node.js example):
Directorymy-app/
Directoryroutes/
- index.ts
- server.ts
- package.json
- tsconfig.json
-
Start the dev server
Terminal window npm run devYour server is running at
http://localhost:3000.
Your first route
Section titled “Your first route”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.
Next steps
Section titled “Next steps”- Routing — learn how file paths map to routes
- Validation — add type-safe request validation with
defineHandler