Adding HTTP Endpoints
When to Use
- Creating a new HTTP route
- Adding an API endpoint
- Wiring a new handler to the Hono app
Route File Pattern
Each endpoint gets its own file with colocated schema, types, and handler.
Location: src/server/routes/{category}/{endpoint}.ts
// src/server/routes/auth/login.ts
import { z } from 'zod';
import type { Context } from 'hono';
import type { ISessionManager } from '../types';
// 1. Request schema (colocated)
export const
[Description truncada. Veja o README completo no GitHub.]