Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Advanced Example

What This Teaches

Use this after the basics when you want to see several features working together: mixed-mode data files, .schema.js, defaults, nested objects, and committed generated types.

Files To Inspect

Run It

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

pnpm run db -- sync --cwd ./examples/advanced
pnpm run db -- serve --cwd ./examples/advanced

Open the local data explorer:

http://127.0.0.1:7331/__db

Expected Result

sync loads mixed data and schema sources, applies defaults in the selected runtime store, 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/projects.json?select=id,name,status,metadata'

Features To Notice

Cleanup

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

More Docs