Awesome Open Source
Awesome Open Source
Sponsorship

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 选项,然后输入需要检查的接口;

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

参考:


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
typescript (9,154
api (1,506
graphql (940
node (896
redis (848
mongodb (723
express (446
jest (249
koa (158
mongoose (154
travis-ci (123
koa2 (109
nestjs (104
graphql-server (88
api-server (49
codecov (26

Find Open Source By Browsing 7,000 Topics Across 59 Categories