Master
Development
Local node server on each GB. Typescript based NodeJS Server.
All methods are documented using jsdoc tags. Tests are written in the test folder using Mocha and NYC for coverage checking.
- Auth is provided through the /auth routes
- Register at /auth/register with a "email" and "password" key. Your user ID will be returned if successful
- Login at /auth/login with a "email" and "password" key. Your user ID and a token will be returned
- To access protected routes, put the returned token inside of the header as the
Authorizationkey - All routes but login and register are protected
Ensure you have node installed (I prefer nvm to manage versions), typescript, and typescript-watch npm i -g tsc-watch typescript
Clone the repository into your choice location, and cd gb-local-node-server.
Install dependencies: npm i
Install and run your mongod client.
npm run dev to compile and run the server.
I've implemented some checkers for code quality
- PreCommit - Prettier using
pretty-quickandtslintauto fix and check - PrePush -
npm run testto test all code before pushing
Make sure you have clean code before pushing