PersonalizationModule
The PersonalizationModule handles the registration of all controllers, routes and services connected to the Personalization module.
Options
| Parameter | Type | Description |
|---|---|---|
provider | PersonalizationProvider | The Personalization provider instance handling feature flag and other personalization operations. |
Example
// shop/src/shop/server/module/server.tsx
import { GrowthBookProvider } from '@archibald/growthbook';
class Server extends CoreServer {
public async initModules() {
const { hybris } = this.configService.get();
await this.registerModules([
new PersonalizationModule({
provider: new GrowthBookProvider({
config: {
apiHost: 'https://growthbook.netconomy.net/',
clientKey: 'key',
streaming: true
}
})
}),
]);
}
}