0.1.2 • Published 5 years ago
nuxt-multi-tenancy-module v0.1.2
Nuxt Multi Tenancy Module
Run multiple web applications in single NuxtJS instance
Introduction
The module creates Vue routes based on the tenant name which can be specifiy by hostname or HTTP header, the tenant name has to match with sub-directory in pages/.
For example, we have tenant apple and create your Vue file tree in pages/apple. When visiting apple tenant, this module will automatically get the corresponding routes of apple.
Installation
- Add
nuxt-multi-tenancy-moduleto your project
yarn add nuxt-multi-tenancy-module- Add
nuxt-multi-tenancy-moduleto thebuildModulessection ofnuxt.config.js
export default {
buildModules: [["nuxt-multi-tenancy-module"]],
multiTenancyModule: {
tenants: ["apple", "banana"],
defaultTenant: "home",
},
};Options
tenants
- Type:
Array[String] - Required
To specify the list of tenants that shoud match to sub-directories in pages/
defaultTenant
- Type:
String
To specify the default tenant when no tenant is matched
License
MIT License