https://github.com/atomicojs/cloudflare
https://github.com/atomicojs/cloudflare
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/atomicojs/cloudflare
- Owner: atomicojs
- Created: 2023-12-30T05:03:41.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-12-30T13:36:55.000Z (over 2 years ago)
- Last Synced: 2025-05-09T07:30:30.875Z (about 1 year ago)
- Language: TypeScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @atomico/cloudflare
This bundle of tools allows using the context from Cloudflare Pages in functions created with @atomico/vite, in the mode `serverActions:{type:"cloudflare"}`.
## Example
```ts
import { useKv } from "@atomico/cloudflare";
export async function setConfig(config: { id: string; value: string }) {
const kv = useKv("config");
await kv.put(config.id, config.value);
return config;
}
```