express
Installation
SKILL.md
When to use this skill
Use this skill whenever the user wants to:
- 用 Express 编写 Node.js HTTP 服务、路由、中间件与静态资源
- 配置 CORS、body 解析、错误处理与部署
How to use this skill
- 核心:express()、app.get/post、req/res、中间件(next);router 与静态。
- 常用:cors、body-parser/json、helmet、morgan;错误中间件与 404。
- 参考:https://expressjs.com/
Best Practices
- 路由与中间件分层;异步错误用 try/catch 或包装。
- 安全头与 CORS;生产用反向代理与 HTTPS。