Reference Backend
This project is used as reference for future backend project.
- Dev: N/A
- Staging: N/A
- Production: N/A
If your service or app needs external services like Postgres, ActiveMQ, etc. you can provision those using:
docker-compose
Your local dev setup should be in a file named
docker-compose.yml
. If you are using those services as part of an integration or end-to-end tests you need to add them to the ci scripts.Running your tests should be doable using
yarn run test <service-name>
Please use the
runServer
method of the infra-nest-server
to run your Nest.js server. It is pre-configured with everything needed for telemetry and security. All you need is to provide your main app module as per the example.Please use the
logging
library and not console.log
. Even better, use Nest.JS dependency injection to inject a logging instance, which can be overridden and spied in tests.The
logging
library provides a single place to control the log routing so if you deviate from that you might not have your log statements delivered correctly to our central storage.We use Prometheus for collecting metrics. For more details about the different types of metrics please read this.
If you use the
infra-nest-server
it is already configured to collect metrics for all your routes and export metrics to be scraped.If you use the
infra-nest-server
it is already configured to provide support for tracing for HTTP/HTTPS API calls as well as support for your service to participate in tracing. We have not added support for tracing to Postgres as is but hope to take care of this soon enough. You do not need to do anything for this to work. It will start working automatically when we add this.Last modified 1mo ago