9ac17e43e3e14324a7d9a83781ca4ba0120516a6
- 引入并配置了Fastify替代Express作为HTTP服务器,提高应用性能。 - 实现了PostController及其CRUD操作,包括请求方法和参数处理。 - 创建并使用CreatePostDto和UpdatePostDto进行请求数据验证。 - 完成了多种自定义提供者的实现和应用,如值提供者、类提供者和工厂提供者。 - 添加了一些全局类型定义,如RecordAny和BaseType,用于增强代码的可读性和健壮性。 - 通过ConfigService添加和管理新的环境配置项。
NestJS 基础配置模板
NestJS描述
Nest framework TypeScript starter repository.
安装依赖
$ pnpm install
运行 Ink NestJS API 应用
# 开发环境
$ pnpm run start
# watch mode
$ pnpm run start:dev
# production mode
$ pnpm run start:prod
适配器
http适配器使用了fastify
文档支持
Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
Languages
TypeScript
100%