Skip to content

基础内容 ​

安装 ​

shell
npm i -g @nestjs/cli

创建项目 ​

shell
nest new project-name

创建模块 ​

shell
nest g mo module-name

创建控制器 ​

shell
nest g co controller-name

创建服务 ​

shell
nest g s service-name

创建实体 ​

shell
nest g mo model-name

创建管道 ​

shell
nest g pi pipe-name

管道 ​

转换数据 核验数据

遇到的问题 ​

prisma Downloading Prisma engines for Node-API for windows [ ] 0%Error: request to https://binaries.prisma.sh/all_commits/b9a39a7ee606c28e3455d0fd60e78c3ba82b1a2b/windows/query_engine.dll.node.gz.sha256 failed, reason: Socket connection timeout ​

Q&A

管道的验证规则 ​

可以使用 class-validator

关注公众号