MongoDB with Node.js: Mongoose vs the Native Driver
Mongoose 5 vs the MongoDB Node.js driver 3: schemas, validation, middleware, populate, lean queries, transactions, and how to choose.
Tag
10 articles
Mongoose 5 vs the MongoDB Node.js driver 3: schemas, validation, middleware, populate, lean queries, transactions, and how to choose.
Learn MongoDB CRUD in the shell and Node.js: insertOne, find with operators, update operators, upserts, deletes, bulkWrite and…
Graceful shutdown for Node.js and Express: SIGTERM handling, keep-alive sockets, closing the pool last, readiness checks and Docker…
Real benchmarks of the cluster module and worker threads on Node 10, plus event loop lag checks, PM2…
Testing an Express API with Jest and Supertest: app factory, auth helpers, error paths, a real database and…
JWT authentication for Express, step by step: bcrypt passwords, short-lived tokens, verify middleware, roles, refresh tokens and token…
Connect Node.js to PostgreSQL with pg 7: one PostgreSQL pool, parameterized CRUD, a transaction helper and constraint errors…
Environment variables in Node.js with dotenv 6: a .env.example contract, a validated Joi config module, fail-fast startup and…
Central error handling middleware for Express 4: AppError, the async error trap, RFC 7807 Problem Details, request ids…
How I structure an Express REST API on Node 10: routes, Joi validation, thin controllers, services and correct…