Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Schema-First Example

What This Teaches

Use this when you know the local contract before you have real records. It defines resources with .schema.jsonc, including a type-only collection with no seed records.

Files To Inspect

Run It

From the repository root, use the repo-internal CLI path:

pnpm run db -- sync --cwd ./examples/schema-first
pnpm run db -- serve --cwd ./examples/schema-first

Open the local data explorer:

http://127.0.0.1:7331/__db

Expected Result

sync initializes empty runtime state for schema-only resources and writes committed generated types.

REST Request To Try

Leave serve running and run this from another terminal:

curl http://127.0.0.1:7331/db/audit-events.json

Features To Notice

Cleanup

Generated .db/ output is ignored by git and can be removed whenever you want a fresh mirror.

More Docs