This is an example project to run Blitz with the Prisma-multi-tenant plugin. (See also the tutorial "Adding multi-tenancy to your Blitz app")
npm install
npm run start
Go to http://localhost:3000/projects and see the list of projects.
Then, go to blitz.config.js
, and change the tenant name to "prod"
:
multiTenantMiddleware((req) => {
return "prod"
})
Finally, restart the server and return see the list of projects at http://localhost:3000/projects
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