typicode/json-server ? reverse-engineered prompt

Reverse engineered prompt

Build me a simple fake REST API server I can run from a local JSON file, so I can mock backend data for frontend work and testing without writing any backend code.

I want to point it at a db.json or db.json5 file, start it with one command, and get a REST API on localhost that lets me list, create, update, and delete items like posts and comments. It should also support a single object like a profile, basic filtering, sorting, pagination, and including related data when needed. If an item is deleted, it should be able to remove dependent records too.

It would be great if it also serves static files from a public folder, and if the IDs are handled automatically when missing. Please make it feel easy to use and friendly for quick mock API setup, and look up current docs online if you need to.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab