文件名称:nestjs-template:nestjs模板整合,使用教程,功能的实现与封装
文件大小:249KB
文件格式:ZIP
更新时间:2024-03-29 05:10:53
mysql graphql jwt typescript swagger
nestjs模板 nestjs模板整合,使用教程,功能的实现与封装 初步需要安装Node.js环境 概览 定时执行任务 文件上传和下载 邮件服务(发送邮件) 任务清单(队列处理数据) 监控服务器的性能,接口等 封装异常处理(统一返回错误格式) JWT鉴权,权限相关控制(注册/登陆) HttpModule请求第三方接口(Axios封装) 使用swagger生成API文档(提供给前端) 使用GraphQL做接口(前端可自定义数据) 使用Typeorm操作数据库(Mysql的操作) logger监听接口请求(打印前端请求详情) 守卫验证角色(判断是否有权限调用) pipe管道转换参数类型(转换前端传递的值) ...... 1.安装启动项目 npm i -g @nestjs/cli 1.1建立项目 将service-nest替换成你自己的项目名称 nest new service-n
【文件预览】:
nestjs-template-master
----tsconfig.build.json(97B)
----yarn.lock(413KB)
----.eslintrc.js(599B)
----src()
--------main.ts(3KB)
--------common()
--------modules()
--------app.service.ts(142B)
--------app.module.ts(2KB)
--------config()
--------schema.gql(1KB)
--------app.controller.ts(274B)
--------app.controller.spec.ts(617B)
----.vscode()
--------settings.json(58B)
----nest-cli.json(64B)
----tsconfig.json(394B)
----test()
--------jest-e2e.json(183B)
--------app.e2e-spec.ts(630B)
----.prettierrc(51B)
----README.md(9KB)
----.gitignore(375B)
----package-lock.json(506KB)
----package.json(3KB)