Skip to content

Commit

Permalink
docs: update vercel-storage
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed May 5, 2023
1 parent 65665a4 commit ffff9db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/content/2.deploy/providers/vercel.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ export default defineNuxtConfig({
::

::alert
You need to either set `KV_REST_API_URL` and `KV_REST_API_TOKEN` environment variables or pass `url` and `token` to driver options. Check [unstorage docs](https://unstorage.unjs.io/drivers/vercel-kv) for more information about driver usage.
You need to either set `KV_REST_API_URL` and `KV_REST_API_TOKEN` environment variables or pass `url` and `token` to driver options. Check [driver docs](https://unstorage.unjs.io/drivers/vercel-kv) for more information about usage.
::

You can now access data store in any event handler:

```ts
export default eventHandler(async (event) => {
const dataStorage = await useStorage("data");
const dataStorage = useStorage("data");
await dataStorage.setItem("hello", "world");
return {
hello: await dataStorage.getItem("hello"),
Expand Down

0 comments on commit ffff9db

Please sign in to comment.