- ES2017 javascript
- Express + MongoDB (Mongoose)
- Consistent coding styles with editorconfig
- Docker support
- Uses helmet to set some HTTP security headers
- Request validation with joi
- Gzip compression with compression
- Linting with eslint
- Tests with mocha, chai and sinon
- Code coverage with istanbul and coveralls
- Git hooks with husky
- Logging with morgan
- Authentication and Authorization with passport
- Continuous integration support with travisCI
# Clone the repo
git clone https://github.com/travislang/ledger-server.git
cd ledger-server
# install dependencies
npm install
# set enviornment variables
cp .env.example .env
npm run dev
npm start
# lint code with ESLint
npm run lint
# try to fix ESLint errors
npm run lint:fix
# run all tests with Mocha
npm run test
# run unit tests
npm run test:unit
# run integration tests
npm run test:integration
# open nyc test coverage reports
npm run coverage
# run lint and tests together
npm run validate
You need to have Docker installed on your system to run docker locally
# run container locally
npm run docker:dev
# run container in production
npm run docker:prod
# run tests
npm run docker:test