- Fork this repository
- Ensure
node (>8.6)
andnpm
are installed - Run
npm install
- Run
npm test
- Run
npm start
- Hit the server to test health
curl localhost:8010/health
and expect a200
response
Setup JSDoc to generate API documentation for the project.
Install JSDoc globally inorder to generate the documentation
npm install -g jsdoc
Consists of following
eslint
- for lintingnyc
- for code coveragepre-push
- for git pre push hook running testswinston
- for logging
eslint
should have an opinionated formatnyc
should aim for test coverage of80%
across lines, statements, and branchespre-push
should run the tests before allowing pushing usinggit
winston
should be used to replace console logs and all errors should be logged as well. Logs should go to disk.- integration to CI such as Travis or Circle - NOT DONE
- Add Typescript support - NOT DONE
Implement Pagination
Please implement the following security controls for your system:
- Ensure the system is not vulnerable to SQL injection
Please implement load testing to ensure your service can handle a high amount of traffic
- Implement load testing using
artillery
- Ensure that load testing is able to be run using
npm test:load
. You can consider using a tool likeforever
to spin up a daemon and kill it after the load test has completed. - Test all endpoints under at least
100 rps
for30s
and ensure thatp99
is under50ms
- Ensure that load testing is able to be run using