Skip to content

Commit

Permalink
rename updateKv to be more descriptive
Browse files Browse the repository at this point in the history
  • Loading branch information
Grunet authored May 26, 2024
1 parent 401e67f commit f7a63d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ You should end up with something like this

### Upload the JSON File to KV

Create a script called `updateKv.ts` (for use with the Deno CLI) as follows
Create a script called `updateFlagDefinitionsInKv.ts` (for use with the Deno
CLI) as follows

```ts
import { createKvClient } from "jsr:@grunet/openfeature-for-denodeploy";
Expand Down Expand Up @@ -96,7 +97,7 @@ placeholders.
export URL_TO_KV=<replace with the url to KV>
export DENO_KV_ACCESS_TOKEN=<replace with your access token>

deno run --unstable-kv --allow-read=flags.json --allow-env=URL_TO_KV,DENO_KV_ACCESS_TOKEN --allow-net updateKv.ts
deno run --unstable-kv --allow-read=flags.json --allow-env=URL_TO_KV,DENO_KV_ACCESS_TOKEN --allow-net updateFlagDefinitionsInKv.ts
```

This will store the flag definitions JSON into KV in Deno Deploy for your
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// export URL_TO_KV=<Gotten from https://dash.deno.com/projects/<your project name>/kv>
// export DENO_KV_ACCESS_TOKEN=<Gotten from https://dash.deno.com/account#access-tokens>
// deno run --unstable-kv --allow-read=flags.json --allow-env=URL_TO_KV,DENO_KV_ACCESS_TOKEN --allow-net updateKv.ts
// deno run --unstable-kv --allow-read=flags.json --allow-env=URL_TO_KV,DENO_KV_ACCESS_TOKEN --allow-net updateFlagDefinitionsInKv.ts

// Had to use --allow-net because wildcards aren't allowed and the CLI is reaching out to a URL like "us-east4.txnproxy.deno-gcp.net" (see https://github.com/denoland/deno/issues/6532)

Expand Down

0 comments on commit f7a63d5

Please sign in to comment.