method SubdomainResolver.prototype.resolve
SubdomainResolver.prototype.resolve(request: IRequest): Promise<Option<ITenant>>

Resolve the tenant id from the request's subdomain.

Parameters

request: IRequest

The incoming request

Return Type

Promise<Option<ITenant>>

Some with the tenant, or None when the host carries no tenant

Usage

import { SubdomainResolver } from "multi-tenancy-plugin/src/index.ts";