FORMA

NestJS 导读

NestJS 是基于 Node.js 的 TypeScript 服务端框架,采用模块化依赖注入,默认 HTTP 平台为 Express,可切换 Fastify。见 后端入门

学习路径(主线 new/

顺序主题文档
1架构与 CLI基础概念
2模块与 DImoduleservice
3HTTP 入口controller
4请求管道middlewarepipesguardsintercept
5横切能力errorcustom-decorators
6配置与数据configdatabase
7安全auth
8基础设施loggercachecronqueuewebSocket
9上线deploy

请求生命周期(简图)

text
Client
  → Middleware
  → Guards
  → Interceptors (before)
  → Pipes
  → Controller handler
  → Interceptors (after)
  → Exception filters(若出错)
  → Response

详见官方 Request lifecycle

旧版目录 before/

before/ 为早期笔记,仅供对照;新项目请跟 new/ 主线,并以 官方文档 为准。

参考文献

以下链接在编写时均可正常访问:

资料说明
NestJS 文档英文官方
First steps创建项目
Fundamentals核心概念

Series

end

51 / 69