As written in the previous section, we can create a file called
.krabs.config.js) inside of the root folder of our project, and krabs will automatically import the configuration from this file.
The configuration file can export one of the following:
so the following configurations are fully supported:
Async function configuration
With the configuration above, we're adding support for two different tenants:
we also write down three different domains for each tenant.
As you can see, in a local environment, website-1 will support all the routes matching the
/dev.[a-z]*.local.website-1.com/ regular expression.
That means that we can set up our
hosts file as follows:
and still, be served with the same Next.js website.