Agents for any host, composed with server primitives through one Vite plugin.
https://vitehub.dev β HEALTH ? 99 / Healthy
Agents for any host, composed with server primitives through one Vite plugin.
https://vitehub.dev β// readme
The server layer for Vite apps. Databases, storage, queues, workflows, and more.
Use one API in your app and deploy it to your choice of cloud.
Β· Β·
Use each primitive alone, or use them together in one app.
// server/api/settings.get.ts
import { defineEventHandler } from "h3";
import { kv } from "vite-hub/kv";
export default defineEventHandler(async () => {
const [error, settings] = await kv.get("settings");
if (error) throw error;
return settings;
});
This route does not change between hosts. The host selects the provider:
| Host | KV | Blob | Database |
|---|---|---|---|
| Cloudflare | Workers KV | R2 | D1 |
| Vercel | Upstash Redis | Vercel Blob | libSQL or D1 HTTP |
| Netlify | Upstash Redis | Netlify Blobs | libSQL |
| Deno | Deno KV | S3-compatible | libSQL |
| Node | fs-lite or Upstash | fs or S3-compatible | SQLite or libSQL |
Supportβ¦