r/node • u/Far-Mathematician122 • Nov 25 '24
r/node • u/steve8708 • Feb 24 '23
Am I the last person to learn that debugging Node.js with chrome devtools is this easy now?
r/node • u/BeingTomHolland • Aug 12 '24
Should i choose nodejs?
Should i choose nodejs?
I recently started learning MERN. I can create crud websites. As a newbie i am confused with choosing a backend. Heard most companies prefer dotnet or Java springboot . These are my concerns:
Is this a fact or a rumour?
Why is nodejs that not much popular popular?
Will the scenario ever change in future?
Give me facts and figures to support your claim
Incase you support nodejs, provide some good resources.📚
r/node • u/bigkingj • May 01 '21
Real-time phone sensor data streaming to the browser made with only javascript!
r/node • u/bwitdoc • Aug 18 '19
Still learning the basics of Node but today I hosted a webpage on a server I created and that was a really awesome and fun experience!
r/node • u/draftax5 • Jul 21 '20
After a year of learning node and react native I build my first full featured app - Ledger: a workout logging and analytics app
r/node • u/jsonathan • Jan 16 '19
I created an Htop-like terminal dashboard for trading Bitcoin, written in Node
r/node • u/coolcosmos • Mar 16 '20
NPM is joining GitHub and is now owned by Microsoft
r/node • u/Crescitaly • Mar 02 '26
After 2 years of solo Node.js in production, here are the patterns I swear by and the ones I abandoned.
Running a Node.js monolith in production for 2+ years as the only developer. 15K+ users, ~200 req/s at peak. Here's what actually matters:
Patterns I swear by:
1. Centralized error handling middleware Every Express route wraps async handlers with a single error catcher. No try/catch in every route. One place to log, one place to format error responses.
2. Request validation at the edge Joi/Zod validation on every incoming request before it touches any business logic. The number of bugs this prevents is insane.
3. Structured logging from day 1 Winston with JSON format, correlation IDs on every request. When something breaks at 3 AM, structured logs are the difference between debugging in 5 minutes vs 2 hours.
4. Database connection pooling with health checks Mongoose with proper poolSize, heartbeat interval, and reconnection logic. Had a 4-hour outage early on because I used default connection settings.
5. Rate limiting per endpoint, not just globally Some endpoints (auth, payments) get strict limits. Others (reads) are more permissive. One global rate limit is too blunt.
6. Graceful shutdown handling SIGTERM handler that stops accepting new connections, finishes in-flight requests, closes DB connections, then exits. Prevents data corruption during deploys.
Patterns I abandoned:
1. Microservices Built 4 separate services for 50 users. Debugging was a nightmare. Consolidated back to a monolith. Night and day difference in velocity.
2. GraphQL For my use case (mostly CRUD with simple relationships), REST was simpler and faster to develop. GraphQL added complexity with no real benefit at my scale.
3. Event-driven architecture with message queues Used RabbitMQ for async processing. Replaced it with simple cron jobs on Lambda. 90% of "async processing" needs are just scheduled tasks.
4. Clustering with PM2 Switched to a single process behind an ALB. Node handles concurrent requests fine with async I/O. PM2 clustering added complexity for minimal benefit at my traffic level.
5. ORM-heavy patterns Started with Sequelize, moved to raw MongoDB queries. For simple CRUD, native drivers are faster and easier to debug.
The biggest insight: complexity is the real enemy when you're solo. Every abstraction layer you add is another thing to debug at 3 AM when things break.
What Node.js patterns have you found essential vs overhyped?
r/node • u/UtopianCorps • Nov 10 '20
Real time synced counter built with Socket.io, NodeJS and Express! The counter will be integrated in a live-quizzing platform I'm currently working on, to control the current question.
r/node • u/EquivalentGuitar7140 • Mar 01 '26
After building 30+ Node.js microservices, here are the mistakes I wish I'd learned earlier
I've been building production Node.js services for about 6 years now, mostly multi-tenant SaaS platforms handling real traffic. Some of these mistakes cost me weekends, some cost the company money. Sharing so you don't repeat them.
**1. Not treating graceful shutdown as a day-1 requirement**
This one bit me hard. Your Node process gets a SIGTERM from K8s/ECS/Docker, and if you're not handling it properly, you're dropping in-flight requests. Every service should have a shutdown handler that stops accepting new connections, finishes current requests, closes DB pools, and then exits. I lost a full day debugging "random 502s during deploys" before realizing this.
**2. Using default connection pool settings for everything**
Postgres, Redis, HTTP clients -- they all have connection pools with defaults that are wrong for production. The default pg pool size of 10 is fine for a single instance, but when you're running 20 replicas, that's 200 connections hitting your database. We hit Postgres max_connections limits during a traffic spike because nobody thought about pool math.
**3. Catching errors at the wrong level**
Early on I'd wrap individual DB calls in try/catch. Now I use a layered error handling strategy: domain errors bubble up as typed errors, infrastructure errors get caught at the middleware/handler level, and unhandled rejections get caught by a global handler that logs + alerts. Way less code, way fewer swallowed errors.
**4. Building "shared libraries" too early**
Every team I've been on has tried to build a shared npm package for common utilities. It always becomes a bottleneck. Now I follow the rule: copy-paste until you've copied the same code 3+ times across 3+ services, THEN extract it. Premature abstraction in microservices is worse than duplication.
**5. Not load testing the actual deployment, just the code**
Your code handles 5k req/s on your laptop. Great. But in production, you've got a load balancer, container networking, sidecar proxies, and DNS resolution in the mix. Always load test the full stack, not just the application layer.
What are your worst Node.js production mistakes? Curious what others have learned the hard way.
r/node • u/LeCoupa • Feb 03 '18
Node.js Cheatsheet - Everything you should know in one single file
r/node • u/jaymeekae • Aug 05 '20
Multi-user interactive visuals with nodejs and p5js (work in progress!)
r/node • u/subnub99 • Mar 06 '20