This repository which is a nodejs api server is made for my personal blog.
I use koa and mongoDB to develop my blog server and support http2, track api's errors with sentry. For code quality, I use eslint and jest with gitlab ci and jenkins to run auto testing then eploy to heroku.
- Node >= 7.10.1
- MongoDB (mLab)
- Redis (Heroku Redis)
PORT
: default is 3000NODE_ENV
:yarn start
is production andyarn dev
is developmentMONGODB_URI
: default is localhostREDIS_URL
: Redis url for rate limitUSERNAME
: usernamePASSWORD
: passwordSALT
: salt for passwordHASH_PASSWORD
:password hashJWT_SECRET
: jwt secretISSUER
: jwt issuer
SENTRY_DSN
: Token for sentryROLLBAR_ACCESS_TOKEN
: Token for RollbarBONSAI_URL
: Bonsai ElasticSearch URL
- Jest
- GitLab CI
- Jenkins + Docker Compose
- Heroku
$ yarn
$ yarn test
or
$ docker-compose up --build --abort-on-container-exit
$ yarn
$ yarn start