A Node template that follows the Clean Architecture principles and encourages established practices.
- TypeScript first
- Dependency injection via Awilix
- CQRS (Command Query Responsibility Segregation)
- High test coverage (unit, integration and functional tests)
- Automatic error handling
- Logging
- Versioned APIs
- Swagger
- Prisma ORM
- Install the latest Node.js LTS
- Install Docker and ensure that it is running
- Create .env file
cp .env.example .env
- Install project dependencies by running
yarn install
- Start Docker (local Postgres instance)
docker-compose up -d
- Create database
npx prisma migrate deploy
- Start development server
yarn start
- Navigate to Swagger ( http://localhost:3000/api-docs)
Build production bundle
yarn build
Lint project (eslint)
yarn lint
Start development server
yarn start
Run all tests
yarn test
Run unit tests
yarn test:unit
Run functional tests (API tests)
yarn test:functional