What does HackerNews think of postgres?
Postgres.js - The Fastest full featured PostgreSQL client for Node.js and Deno
That said, it is true that the Node/JS world is primarily hype-driven by "thought leaders" and people seeking personal brand and clout. Go on JS/React Twitter and prepare to loudly groan at the self importance on display.
There are good packages out there that try to do things in a sane way without wasting your time. Postgres.js [1] is one of them.
but personally i handwrite my queries with https://github.com/porsager/postgres for flexibility and performance
most orms use node-pg lib which has shit performance.
For instance - I would love to be able to use https://github.com/porsager/postgres with sqlite.
[1] https://github.com/porsager/postgres
Here's an example where it really shines:
const users = [
{ name: 'Murray', age: 68 },
{ name: 'Walter', age: 80 },
];
await sql`insert into users ${ sql(users) }`;
Also, node-postgres is ripe for sql injections because you just concatenate strings yourself when using it...
Better: Seamless TypeScript support without having to deal with 3rd party packages or tsconfigs. A standard library modeled after Go's that is a WIP, but solid overall. Having browser APIs in the runtime is great, removes the mental context switch between browser/node. Formatter built in to the binary. YMMV, but I prefer the url imports and lack of package.json.
I can't speak from a professional standpoint of migrating a project from Node to Deno; honestly, I don't think it's worth doing that (yet). But Deno is far more enjoyable to me as a hobbyist programmer and working on solo projects. I recently deployed an app backend using just the std and the Deno port of postgres.js[0] to Deno Deploy and it was a breeze.
I also think it's a great starting point for anyone looking to learn JavaScript.
You should take a look at Postgres.js [0] which supports Deno and TypeScript. Version 3.x was released recently and discussed in this HN thread [1].
The client is implemented in JavaScript. Queries can be written using JavaScript template literals.
[0] https://github.com/porsager/postgres [1] https://news.ycombinator.com/item?id=30794332