Enterprise

Multi-Tenancy

Tenant isolation middleware.

1 min readDocumentationEdit this page

Usage#

typescript
import { multiTenancy, getTenant } from '@AxilJS/cloud'
 
app.use(multiTenancy({ strategy: 'header', headerName: 'x-tenant-id' }))
 
app.get('/data', (req, res) => {
  const tenant = getTenant(req)
  res.json({ tenant: tenant.id })
})

Strategies: header, subdomain, jwt

Help improve the documentation

AxilJS is open source and documentation improvements are welcome.

AxilJS DocumentationMIT License · Built by SyntaxilitY