Installation

Get started with Nuxt Multi Tenancy module.

Quick Start

Add the correct .npmrc file to your project

.npmrc
shamefully-hoist=true
strict-peer-dependencies=false
auto-install-peers=true

@nobears-front-end:registry=https://git.nobears.nl/api/v4/packages/npm/
//git.nobears.nl/:_authToken=${GIT_NOBEARS_TOKEN}

Install the eslint package to your project

You can install the module with your favorite package manager:

pnpm add @nobears-front-end/nuxt-multi-tenancy

Create a configuration file

Create a configuration file for the tenants. You can use the tenants.config.ts file to configure the tenants.

tenants.config.ts
export default defineNuxtMultiTenancyConfig([
  {
    hosts: ["localhost:3000"],
    config: {
      url: "localhost:3000",
      name: "Localhost",
      tenant: {
        id: "localhost",
        site: {
          "nl-NL": "localhost-nl-NL",
        },
      },
    },
  },
]);

Nuxt Configuration

For all available options, please refer to the configuration page.

In order to use the nuxt-multi-tenancy module, you need to add the module to your Nuxt config.

nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@nobears-front-end/nuxt-multi-tenancy'],
});