This is an example project to run Express with multi-tenancy using Prisma-multi-tenant. (See also the tutorial "Adding multi-tenancy to your Express app")
npm install
Start the server, and go to http://localhost:4000
npm run start
Then, go to multi-tenant.js
, and change the tenant name to "prod"
:
const name = 'prod'
Finally, re-start the server, and refresh the page!
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