4 ms·
I've got a way of doing it, where the server is basically just consisting of 4 types of endpoints: - CRUD on table records, which makes the data schema indepen
by ohvigrinia 6y ago
I've got a way of doing it, where the server is basically just consisting of 4 types of endpoints:
- CRUD on table records, which makes the data schema independent
- Actions which can update multiple tables, call 3rd party etc
- Queries which can go more complex things than GET or GET list, such a search, or filtering, or sorting
- Selections, which are gets or queries run over multiple tables and combining the results
I'm addition each endpoint returns in JSON, but can have a
/with/:view
suffix attached to template that into HTML
I find this organizes well and covers all use cases
If anyone wants to see a Node template of this, it's
https://github.com/cris691/servedata https://github.com/cris691/servedata