This project is about how to setup jest testing in a nodejs backend project with mongodb database.
It's a continuation of node-mongodb-typescript-eslint-prettier.
- Jest testing. ✅
- Github actions. ✅
- Express framework. ✅
- MongoDB database connection, schema creation and validation. ✅
- Zod validation. (Request body, params and query validation) ✅
- Error handling. ✅
- TypeScript configuration. ✅
- Eslint configuration. ✅
- Prettier configuration. ✅
yarn dev
Runs the app in the development mode.
yarn test
Runs the app in the testing mode.
yarn run build
Builds the app for production to the build
folder.
yarn run prod
Runs the production app.
yarn run lint
Eslint will show all errors and warnings.
yarn run lint:fix
Eslint will fix all errors and warnings (which are fixable).