Web apps · Express
Express REST API
$ express routes
- GET/
- GET/api/todos
- POST/api/todos
- PATCH/api/todos/:id
- DELETE/api/todos/:id
$ npm run dev
5 routes · API only, no screen to capture4 HTTP methods
What you get
An Express 4 server written in TypeScript and run with tsx in development. It exposes a small todos resource with zod-validated request bodies and an in-memory array; replace the array with a database client and the handlers stay the same.
Files, exactly as copied.
Exactly what is copied into a new project: 5 files, nothing generated.
Explorer 5
import express from "express";import { z } from "zod"; const app = express();app.use(express.json()); type Todo = { id: number; title: string; done: boolean };const todos: Todo[] = [{ id: 1, title: "Describe your API in the Codexa chat", done: false }];let nextId = 2; const TodoInput = z.object({ title: z.string().min(1).max(200), done: z.boolean().optional() }); app.get("/", (_req, res) => { res.json({ name: "codexa-api", endpoints: ["GET /api/todos", "POST /api/todos", "PATCH /api/todos/:id", "DELETE /api/todos/:id"] });});app.get("/api/todos", (_req, res) => res.json(todos));app.post("/api/todos", (req, res) => { const parsed = TodoInput.safeParse(req.body); if (!parsed.success) return res.status(400).json({ error: parsed.error.flatten() }); const todo: Todo = { id: nextId++, title: parsed.data.title, done: parsed.data.done ?? false }; todos.push(todo); res.status(201).json(todo);});app.patch("/api/todos/:id", (req, res) => { const todo = todos.find((t) => t.id === Number(req.params.id)); if (!todo) return res.status(404).json({ error: "Not found" }); const parsed = TodoInput.partial().safeParse(req.body); if (!parsed.success) return res.status(400).json({ error: parsed.error.flatten() }); Object.assign(todo, parsed.data); res.json(todo);});app.delete("/api/todos/:id", (req, res) => { const i = todos.findIndex((t) => t.id === Number(req.params.id)); if (i === -1) return res.status(404).json({ error: "Not found" }); todos.splice(i, 1); res.status(204).end();}); const port = Number(process.env.PORT) || 3000;app.listen(port, "0.0.0.0", () => console.log(`API listening on http://localhost:${port}`));Remix
Remix this template.
Describe what to change and the agent starts from Express REST API's files. The box is already started for you: finish “Start from Express REST API and …”
Dependencies
Documented from the template's package.json. The runtime has a prebuilt dependency set for Node.js + Express, so installs are fast.
- express^4.21.0
- zod^3.24.0
- tsx^4.19.0
- typescript^5.8.0
How it runs
- Framework
- Node.js + Express
- Dev command
- npm run dev
- Build command
- npm run build
- Output directory
- dist
- Port
- 3000
- Entry route
- /api/todos
Projects run in an isolated sandbox with a live preview. Read the projects documentation for settings, snapshots and deployment.
Keep browsing.
All templates
React starter
A clean React + TypeScript + Tailwind single-page app. The default target for AI generation.

Sales leads CRM
A lean CRM for a small sales team: leads, deal values, next follow-ups and a pipeline board.

Wedding guest list
Keep the guest list, RSVPs, meal choices and table plan for the big day in one place.
Build on Express REST API
Create a free account, start from this template, and ask the AI agent to turn it into your app.