blog-serviceblog service @nestjs

联合创作 · 2023-09-18 22:51

blog service


Build Status coverage GitHub forks GitHub stars GitHub issues GitHub last commit


此分支是使用 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 选项,然后输入需要检查的接口;


稍等片刻,会生成新的报告。


参考:


浏览 9
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报
评论
图片
表情
推荐
点赞
评论
收藏
分享

手机扫一扫分享

编辑 分享
举报