Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

README.md

Diagnostics Example

What This Teaches

Use this when you want to see how db reports local fixture drift. It intentionally includes schema/data mismatches so the viewer can show source diagnostics while valid resources still work.

Files To Inspect

Run It

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

npm run db -- sync --cwd ./examples/diagnostics
npm run db -- serve --cwd ./examples/diagnostics

Open the viewer:

http://127.0.0.1:7331/__db

Expected Result

sync reports warnings. The viewer surfaces diagnostics for the broken source files instead of making unrelated resources unusable.

REST Request To Try

Leave serve running and run this from another terminal:

curl http://127.0.0.1:7331/db/users.json

Expected diagnostics include an extra twitterHandle field in users.json and an undefined nested metadata.priority field in projects.schema.jsonc.

Features To Notice

Cleanup

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

More Docs