My custom nodejs boilerplate, following the Clean Architecture and DDD principles.
- Nodejs - Javascript runtime.
- Awilix - Dependency Injection and Inversion of Control framework.
- Express - HTTP server framework.
- Winston - Centralizing and transporting log streams.
- Joi - Schema validations.
- Structure - Used for defining domain entities attributes.
- Fejl - Error Handling
- Jest - Testing framework.
- Supertest - Used to test http endpoints and features.
- Swagger - Documentation with openApi specifications.
Before running the project, check if you have Nodejs 14.0.> installed and remember to set the environment variables by creating a .env
file following the env.copy
example.
-
Install node modules
$ npm install
-
Run project in development mode with hot-reload
$ npm run dev
-
Start the application
$ npm start
-
Run unit tests
$ npm run test:unit
-
Run features tests
$ npm run test:features
After running the server, you can find the api docs at http://localhost:{APP_PORT}/api/docs/
- Create repo and readme.
- Add awilix DI Container
- Add express server interface
- Add logger infrastructure
- Add Swagger middleware
- Add http client integration example
- Add Error classes with fejl
- Add jest unit config
- Add jest features config
- Add 100% test coverage
- Add Changelog.md file
- Add License file