Better HN
topnewbestaskshowjobs
Log inSign up

ohvigrinia

2 karma · joined May 11, 2020 (6y ago) · 5 submissions

Submissions

1.

The Truth Is (Still) Out There(nymag.com ↗)

1 points · by ohvigrinia · 6y ago · discuss

comment 6y ago · link · parent

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

comment 6y ago · link · parent

Would there be an advantage to implementing this using WebRTC as part of the networking, so you could use it in browser?

I don't know much about this space, but always been interested in some sort of web socket/WebRTC p2p fs.