nitro-api-development
Installation
SKILL.md
Nitro v3 接口开发
核心依赖
pnpm add nitro
导入规范 [CRITICAL]
// 必须从 nitro/h3 导入
import { defineHandler, HTTPError, readBody, getQuery, getRouterParam } from "nitro/h3";
import type { H3Event } from "nitro/h3";
// 使用项目工具函数
import { defineApiHandler, badRequest, notFound } from "../utils/api";