The starting point template repository for developing TypeScript microservices. It provides a well-defined structure for building TypeScript-based applications and integrates into the organisations CI/CD workflows.
The CI Pipeline uses super-linter. You can run it locally with the following command:
docker run -e RUN_LOCAL=true -e TYPESCRIPT_DEFAULT_STYLE=prettier -e VALIDATE_DOCKERFILE_HADOLINT=false -v $(pwd):/tmp/lint github/super-linter:slim-latest
Note: We have disabled HADOLINT for now as we are getting an error: qemu: uncaught target signal 11 (Segmentation fault) - core dumped
.
The CI Pipeline uses the test
target from the Dockerfile to run the tests. You can run it locally with the following command:
docker compose -f docker-compose.test.yml up --exit-code-from app --build
Note: This will create a /coverage folder where you can review the coverage details.
You can run all the integration services using the following command:
docker compose -f docker-compose.dev.yml up
- MongoDB (mongoose)
- Redis (BullMQ and bull-board)
- RabbitMQ (RabbitMQ and RabbitMQ Management)
The following commands are also available. Note that while these are made available, the docker compose
commands are the ones called throughout the CI/CD Pipeline.
npm run prettier
npm run lint
npm run test
npm run dev
npm run build
npm run start