News for hackers. Stuff that matters.
Re:Generating JSON Directly from Postgres by MuffinFlavored on Thursday July 15, 2021 @06:20PM (#27850790)
> Maybe in the database as stored procedures?

I always wondered if I could make something like this work: https://github.com/plv8/plv8

Maybe couple it with this: https://postgrest.org/

Just not sure if it was worth the effort upfront to learn something other than simple Express (node.js) servers/middleware functions/router controllers with database client access. That paradigm just feels infinitely more "in control" and "extensible" to me.

Re:Generating JSON Directly from Postgres by rattray on Thursday July 15, 2021 @07:07PM (#27851149)
You might like http://postgraphile.org, which is "postgrest for graphql" but where you can override anything with normal Node code – it's just an express plugin. (The docs don't make it obvious how powerful/flexible the tool is). Of course, you can also use pl/v8, pl/pgsql, etc and any other advanced postgres feature as well.
Re:Generating JSON Directly from Postgres by inopinatus on Thursday July 15, 2021 @06:23PM (#27850817)
Once the client is the MVC execution environment with the client-server interaction used mostly for data replication, plus some extra invokable server-side behaviours written in isomorphic code, we can congratulate ourselves on having more-or-less reinvented Lotus Notes.