This project demonstrates the basic structure for setting up multi-tenant application in NestJs, using the provider scopes to get a database connection from the DB manager cache as per client's request.
Use http://localhost:3000/?q=1 for connecting to first database. http://localhost:3000/?q=2 for connecting to second database.
Both DBs info can be found in the database.provder.ts file. PS: This is just for demo multi-tenant database purpose. Don't put your db credentials in code.
$ npm install# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov