0.0.5 • Published 2 years ago

growthbook-remote-config v0.0.5

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Growthbook Remote Config (for Angular)

This library is meant for use with Angular

Before using this library, you need to sign up for an account at growthbook.io, or host it yourself.

The cloud variant (signing up at growthbook.io) is free up to 5 seats, quite attractive for a startup, especially you want something powerful to do remote configuration, including:

  • Remote Configuration (replacing text)
  • Feature Flags (boolean switches)
  • A/B Test (matching variation string keys)
  • Percentage Rollout (percentage of boolean switches)

Creating API Key

Follow the instruction here to create an API Key.

Installation

Install the module with npm or yarn

npm i growthbook-remote-config

Initialize this remote config module with the API key retrieved from above

// Import this module
import { GrowthbookRemoteConfigModule } from 'growthbook-remote-config';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule,
    // Initialize the module before using it 
    GrowthbookRemoteConfigModule.forRoot({
        apiKey: '** API Key from GrowthBook **',
    }),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Note that there are two configuration options for this module

Only apiKey is a mandatory field. Replace featuresEndpoint only if you are self-hosting.

GrowthbookRemoteConfigModule.forRoot({
    // API Key
    apiKey: '** API Key from GrowthBook **',
    // Optional endpoint parameter. 
    // Defaults to 'https://cdn.growthbook.io/api/features'
    featuresEndpoint: '',
}),

Documentation

See more on the usage of the module here

Release

See more on instructions to release package here

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago