@nuxthub/core
Version:
Build full-stack Nuxt applications on Cloudflare, with zero configuration.
28 lines (27 loc) • 848 B
TypeScript
import type { HubKV } from '@nuxthub/core';
/**
* Access the Key-Value storage.
*
* @example ```ts
* const kv = hubKV()
* await kv.set('key', 'value')
* ```
*
* @see https://hub.nuxt.com/docs/features/kv
*/
export declare function hubKV(): HubKV;
/**
* Access the remote Key-Value storage.
*
* @param projectUrl The project URL (e.g. https://my-deployed-project.nuxt.dev)
* @param secretKey The secret key to authenticate to the remote endpoint
* @param headers The headers to send with the request to the remote endpoint
*
* @example ```ts
* const kv = proxyHubKV('https://my-deployed-project.nuxt.dev', 'my-secret-key')
* await kv.set('key', 'value')
* ```
*
* @see https://hub.nuxt.com/docs/features/kv
*/
export declare function proxyHubKV(projectUrl: string, secretKey?: string, headers?: Record<string, string>): HubKV;