hapi-domainculture

2.0.1 • Public • Published

BuildStatus

hapi-domainculture

Domain Culture for Hapi.js

WHY?

We need to be able to support multi domain and languages

How?

{
  register: require('hapi-domainculture'),
  options: {
    white_list: {
      com: {
        cultures: ['en-US', 'fr-CA'],
        default: 'en-US'
      },
      commx: {
        cultures: ['es-MX', 'en-US'],
        default: 'es-MX'
       }
    }, // white_list is required
    query_params: {
      culture: 'culturequery', // defaults to "culture"
      domain: 'domainquery', // defaults to "domain"
      ignore: true // If ignore is true, no queryparams will be checked
    },
    headers: {
      domain: 'domain', // optional, defaults to "domain"
      culture: 'culture' // optional, defaults to "Accept-Language"
    },
    default: 'com' // Default domain to use. required.
  }
}
 

Checkout the test directory for more examples

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
2.0.12latest

Version History

VersionDownloads (Last 7 Days)Published
2.0.12
1.2.11
1.2.01
2.0.01
1.1.01
1.0.01
0.0.61
0.0.51
0.0.41
0.0.31
0.0.21

Package Sidebar

Install

npm i hapi-domainculture

Weekly Downloads

12

Version

2.0.1

License

ISC

Last publish

Collaborators

  • doron2402
  • duereg
  • jschapir
  • maxthegeek1
  • tlhunter