0.0.1 • Published 3 years ago

@matriarx/api v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

Matriarx API

A project template that contains the core essentials for an API project.

Packages

  • typescript
  • jest
  • eslint
  • prettier
  • husky
  • lint-staged
  • express
  • socket.io
  • supertest
  • ts-node-dev

Usage

  npx @matriarx/api 'project'
  cd 'project'
  npm i
  npx husky install bin
  git add bin/pre-commit && git add bin/pre-push

  ...

  npm start // run the index file
  npm run build // compile everything
  npm run deploy // compile everything and run the index file
  npm run dev // compile and run in watch mode
  npm test // run tests
  npm run lint // run eslint
  npm run style // run prettier

Config

  • All of the configurations for typescript, jest, eslint, prettier, husky and lint-staged have already been set up.
  • Project root is /src so typescript will search for all source files there, after which it will compile everything to /lib.
  • It will automatically lint and style the code on git commit as well as run the tests on git push, if you want to change that you can edit the husky hooks in /bin.
  • The coverage tests have a threshold which will fail the tests if you haven't covered majority of the code base, if you want to change that you can edit the percentage values in .jestrc.json.

Contribution

If you have any ideas or suggestions for ways I can improve on this repo you can contact me at mia@matriarx.org. If you find any issues let me know so I can fix it, alternatively feel free to make a PR.

License

MIT.