Skip to content

Instantly share code, notes, and snippets.

@Gaurav8757
Created May 19, 2026 13:52
Show Gist options
  • Select an option

  • Save Gaurav8757/766d53243f8495045917ba4000b0c284 to your computer and use it in GitHub Desktop.

Select an option

Save Gaurav8757/766d53243f8495045917ba4000b0c284 to your computer and use it in GitHub Desktop.
Foundation of Redis

Foundation OF Redis

Database Library “new keyword” Reason
MongoDB Mongoose ❌ Required नहीं mongoose.connect() खुद client बना देता है
MongoDB Custom Mongoose ✔ Required const customMongoose = new mongoose.Mongoose(); आपको नया independent client चाहिए होता है
Redis ioredis ✔ Required const redis = new Redis(); // <- NEW keyword required Redis client एक class instance होता है
Redis redis (legacy) ✔ Required वही reason — class instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment