@@ -8,6 +8,11 @@ A Vercel Flags adapter for [Flipt](https://flipt.io).
88npm install @flipt-io/vercel-adapter
99```
1010
11+ ## Prerequisites
12+
13+ - A Flipt instance ([ self-hosted] ( https://docs.flipt.io/installation/overview ) or [ Flipt Cloud] ( https://docs.flipt.io/cloud/overview ) )
14+ - A Vercel project
15+
1116## Usage
1217
1318### Basic Setup
@@ -18,8 +23,19 @@ import { createFliptAdapter } from '@flipt-io/vercel-adapter';
1823const adapter = createFliptAdapter ({
1924 url: process .env .FLIPT_URL ,
2025 namespace: process .env .FLIPT_NAMESPACE ,
26+ });
27+ ```
28+
29+ ### Flipt Cloud Setup
30+
31+ ``` typescript
32+ import { createFliptAdapter } from ' @flipt-io/vercel-adapter' ;
33+
34+ const adapter = createFliptAdapter ({
35+ url: process .env .FLIPT_URL , // Your Flipt Cloud instance URL (e.g. https://{your-flipt-cloud-instance}.flipt.cloud)
36+ namespace: process .env .FLIPT_NAMESPACE , // Optional, defaults to `default`
2137 authentication: {
22- clientToken: process .env .FLIPT_CLIENT_TOKEN ,
38+ clientToken: process .env .FLIPT_CLIENT_TOKEN , // Your Flipt Cloud API key
2339 },
2440});
2541```
@@ -85,6 +101,7 @@ The adapter accepts the following configuration options:
85101
86102- ` url ` : The URL of your Flipt instance (defaults to ` http://localhost:8080 ` )
87103- ` namespace ` : The namespace to use for flag evaluation (defaults to ` default ` )
104+ - ` updateInterval ` : The interval (in seconds) to check for flag changes (defaults to 5 seconds in development)
88105- ` authentication ` : Authentication configuration
89106 - ` clientToken ` : The client token to use for authentication
90107
0 commit comments