This is an example project written in TypeScript to run Prisma and Prisma-multi-tenant.
npm install
Run the example script:
npm run example
Then, go to multi-tenancy-example.js
, and change the tenant name to "prod"
:
const name = 'prod'
Finally, re-run the script!
This will list the available tenants:
pmt list # or prisma-multi-tenant list
This will open studio for the tenants (dev & prod):
pmt studio dev
pmt studio prod
This will make you create a new tenant:
pmt new