A CLI tool to run an Express server that proxies CRUD requests to a ZenStack backend
npm install @zenstackhq/proxyA CLI tool to run an Express server with ZenStack proxy integration directly from the command line.
``bash`
npm install @zenstackhq/proxy
`bash`
zenstack-proxy [options]
- -z, --zenstack Path to ZenStack generated folder-p, --port
- Port number for the server (default: 8008)-s, --schema
- - Path to ZModel schema file (default: "schema.zmodel")-d, --datasource-url
- Datasource URL (overrides schema configuration)-l, --log
- Query log levels (e.g., query, info, warn, error)
#### Basic Usage
Start a server with default settings (searches for ZenStack output automatically):
`bash`
zenstack-proxy
#### Specify ZenStack schema and generated output
`bash`
zenstack-proxy -s ./schema/schema.zmodel -z ./generated/zenstack
#### Custom Port
`bash`
zenstack-proxy -p 8888
The server provides the following endpoints:
- POST /api/model/:model/:operation - All ZenStack operations (find, create, update, delete, etc.)
The ZenStack middleware handles all CRUD operations for your models.
- GET /api/schema` - Get complete schema metadata (models + enums)
MIT