Prerequisites
- A project from Install that runs with
bun run dev - A version id in
keja.versioning.ts(usuallyv1)
Steps
1. Choose the server folder
- Public API →
src/public(or yourpublic_path) - Service API →
src/service(or yourservice_path)
method: "post".
2. Create a route file
Withkeja dev already running, create an empty src/public/items.ts. On the next reload Keja fills it with a basic GET /items stub. Edit that stub, or replace it with your own route:
path is the URL after the version segment. name is optional; Scalar uses it as the operation summary. Service files get a post stub instead.
3. Confirm reload and response
Withkeja dev running, save the file. You should see reloading... then no issues found.
http://127.0.0.1:3000/docs. The route appears under the v1 tag.