mirror of
https://github.com/zenstackhq/zenstack
synced 2026-05-24 10:08:55 +00:00
| .. | ||
| src | ||
| test | ||
| eslint.config.js | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
| tsup.config.ts | ||
| vitest.config.ts | ||
@zenstackhq/server
Automatic CRUD API handlers and server adapters for ZenStack. Exposes your ZenStack ORM as RESTful or RPC-style API endpoints with built-in OpenAPI spec generation.
Supported Frameworks
- Express
- Fastify
- Next.js
- Nuxt
- SvelteKit
- Hono
- Elysia
- TanStack Start
API Styles
- REST — Resource-oriented endpoints with JSON:API support
- RPC — Procedure-call style endpoints
Installation
npm install @zenstackhq/server
Usage (Express example)
import express from 'express';
import { ZenStackMiddleware } from '@zenstackhq/server/express';
import { RPCApiHandler } from '@zenstackhq/server/api';
const app = express();
app.use('/api/model', ZenStackMiddleware({...}));