| title | Adding an Endpoint |
|---|---|
| description | How to contribute a new API dataset to the project |
| audience | developer |
A new API is three files plus a registry rebuild. This is the most common contribution — see the pull request flow for process.
flowchart LR
A["1 · Create<br/>server/api/name.json"] --> B["2 · Copy to<br/>name.json.backup"]
B --> C["3 · Regenerate registry<br/>GET /generate"]
C --> D["4 · Restart server<br/>(nodemon does this on file change)"]
D --> E["Live at /name/:resource"]
- Create
server/api/<name>.jsonfollowing the endpoint JSON format — ametaDataentry plus one array per resource, each record with a uniqueid. - Copy it to
server/api/<name>.json.backup— the pristine twin that resets restore from. - Regenerate the API registry by hitting
GET /generateon a running server. This rewritesserver/GeneratedAPIList.js, which is checked in — commit it with your data files. - The router mounts APIs from the registry at startup, so the server needs a restart to pick the new API up; locally
nodemonrestarts automatically when the file changes.