blog-serviceblog service @nestjs
blog service
此分支是使用 nest 重构分支。
NestJS + MongoDB + Redis + Docker + GraphQL
start
install
# Setup mongodb and redis
# start
docker-compose -f docker-compose.dev.yml up -d
# stop
# docker-compose -f docker-compose.dev.yml down
# remove volume/cache
# docker-compose -f docker-compose.dev.yml down -v
# install
$ npm install
$ npm run dev
test
$ npm run test:unit
$ npm run test:e2e
debug
$ npm run debug
deploy
...
性能调优
# 安装 clinic
$ npm i -g clinic
# 安装压力测试工具
$ npm i -g autocannon
# 在检查之前,先 build 出来
$ npm run build:stage
# run
$ npm run performance
你可以选择 doctor/IO/flame 选项,然后输入需要检查的接口;
稍等片刻,会生成新的报告。
参考:
- node-clinic;
- autocannon;
- 数据分析文档:clinic;
评论
nestjs
AcollectionofBadassmodulesandutilitiestohelpyoulevelupyourNestJSapplication.PackageDescriptionVersio
nestjs
0
nestjs-rbacAwesome RBAC for NestJs
DescriptionTherbacmoduleforNest.Installationnpmi--savenestjs-rbacQuickStartForusingRBACthereisneedto
nestjs-rbacAwesome RBAC for NestJs
0
nestjs-rbacAwesome RBAC for NestJs
DescriptionThe rbac module for Nest.Installationnp
nestjs-rbacAwesome RBAC for NestJs
0
Service RepositoryWeb Service 仓库
ServiceRepository是一个开源的分布式容灾WebService目录。你可以用它来注册你的服务信息。它同时提供了一个非常易用的API,可以作为你的服务的代理。客户端将通过仓库获得你的服务信
Service RepositoryWeb Service 仓库
0