Nuxt module for unkey
@unkey/nuxt
module.
@unkey/nuxt
just requires your root key. Create an .env
file in your project and add the following:
NUXT_UNKEY_TOKEN
environment variable.
From this point onward, @unkey/nuxt
will automatically:
Authorization: Bearer xxx
header.useUnkey()
helper that allows access to an automatically configured unkey instance.unkey
context on the server with event.context.unkey
in your server routes or useRequestEvent().context.unkey
in the Vue part of your app.
For example:
useUnkey()
, you can see the API docs for the TypeScript client.
For example: