Custom GraphQL API boilerplate for my needs with:
- auth
- mailing
- error handling
- tests
It's built with Node.js best practices. Therefore it's meant to be used behind a reverse proxy.
Make sure you have MongoDB up & running.
$ mongod
$ git clone https://github.com/atmys/graphql-auth-api.git
$ cd graphql-auth-api
$ npm install
$ npm start
Using dotenv, your folder should have a .env folder with at least a .env file for development & a .spec.env file for testing.
MyAPI/
| index.js
| ...
| .env/
| .env
| .spec.env
You can check the expected environment variables in the config.js file.
// lint
$ npm run eslint
// run unit tests
$ npm run spec:unit
// run integration tests
$ npm run spec:int
// run lint, all tests & coverage
$ npm test