PostgreSQL
pino
Our great sponsors
PostgreSQL | pino | |
---|---|---|
57 | 38 | |
11,891 | 13,221 | |
- | 2.1% | |
8.0 | 8.6 | |
13 days ago | 4 days ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
PostgreSQL
-
Neon Is Generally Available: Serverless Postgres
pg doesn't do too well with serverless, dead connections are left in the pool (or something)
-
NodeJS Security Best Practices
If you don't want to use ORM then there are some other packages as well! For PostgreSQL we have node-postgres
-
Building Secure Neon-Infused Web Apps with Auth0, Express, and EJS
Interface with PostgreSQL database
-
Drizzle is just as unready for prime-time as Prisma, what else is there?
(Instead of the following with pg.)
-
Nile, Serverless Postgres for Modern SaaS
So far every JS framework that uses https://node-postgres.com works great and so no reason to think Drizzle wouldn't.
-
We migrated to SQL. Our biggest learning? Don't use Prisma
One thing that keeps coming up is that SQL equals low productivity. I don't think this is true. I think the culprit is that most developers are using to heavily abstracting SQL using ORMs like Prisma that hides the database and SQL logic.
Since building a SQL generator (https://aihelperbot.com) as a side project, I have become much more proficient in SQL and even though I am also locked into Prisma, I use the `queryRaw` all the time to execute raw SQL queries. You can understand the code without knowing Prisma API. It is more performant. For more complex SQL queries, I use the SQL generator for initial suggestions and adapt if needed.
For the next projects I build I want to use the minimal Postgres client (https://github.com/brianc/node-postgres) combined with a lightweight migration library.
-
Using AI I have departed from ORM and embraced SQL
For newer projects I use the small Postgres client. Initially my leap into SQL was lead by AI but as I refreshed and relearned SQL, I now use a mixture of AI and self-written SQL queries. Something like this is just easier to have AI do the grunt work and then adjustment as needed.
-
Credentials Leak with Knex
This was a known issue for pg developers, and they managed to fix it a long time ago (at the pg level), but the knowledge of this problem didn't reach Knex maintainers.
-
Why SQL is right for Infrastructure Management
Integrate the database into your application itself with a postgres client library allowing your applications to make infrastructure changes (like provisioning sharded resources for a client that wants isolation, or using a more accurate forecasting model to pre-allocate more resources before the storm hits).
-
What is your development stack for 2023?
node-postgres (raw sql, without ORM)
pino
-
Migrate Your Express Application to Fastify
Learn more about logging in Fastify and how to customize the Pino logger.
-
Logs monitoring with Loki, Node.js and Fastify.js
The Fastify framework includes the Pino logger by default (a really great logger with lots of cool features that doesn't compromise on performance). The framework itself allows a lot of really cool stuff, like controlling the level of logs at runtime.
- Advice on Node Logging to Google Cloud Platform
-
Getting Started with Fastify for Node.js
Fastify provides a built-in logging mechanism based on Pino that allows you to capture various events in your applications. Once enabled, Fastify logs all incoming requests to the server and errors that occur while processing said requests. It also provides a convenient way to log custom messages through the log() method on the Fastify instance or the request object.
-
10 Powerful Node.js Libraries Every Developer Should Know About
1. pino
-
Node.js 20 Released: Experimental Perms, new V8, and Single Executable Apps
Vitest is for frontend. Jest is not good for backend (I donโt like it for frontend either), take a look at this issue.
-
What is the preferred stack for managing medium to large-size logs?
Have a look at https://github.com/pinojs/pino
-
Logging in your API
NodeJS -> Pino, Winston, Bunyan, Npmlog, e.t.c.
-
Logging practices
Use a configurable logger like pino
-
Logging - correlationId - headers - how?
Using pino as a logger, for every request on the _server_ , a unique ID generated client side in the headers, so a log may be something like:
What are some alternatives?
Prisma - Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB
winston - A logger for just about everything.
MySQL - A pure node.js JavaScript Client implementing the MySQL protocol.
Bunyan - a simple and fast JSON logging module for node.js services
TypeORM - ORM for TypeScript and JavaScript. Supports MySQL, PostgreSQL, MariaDB, SQLite, MS SQL Server, Oracle, SAP Hana, WebSQL databases. Works in NodeJS, Browser, Ionic, Cordova and Electron platforms.
console-log-level - The most simple logger imaginable
MongoDB - The Official MongoDB Node.js Driver
log4js-node - A port of log4js to node.js
Aerospike - Node.js client for the Aerospike database
winston-daily-rotate-file - A transport for winston which logs to a rotating file each day.
Redis - ๐ A robust, performance-focused, and full-featured Redis client for Node.js.
opentelemetry-specification - Specifications for OpenTelemetry