Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
Why does redis-connect have so much boilerplate code?

and what is the equivalent for a pure node implementation? I was considering dropping Express and just using Node for my server. What would be the equivalent representation of the code below in Node?

  // https://www.npmjs.com/package/connect-redis
  const session = require("express-session");
  const RedisStore = require("connect-redis")(session);
  const { createClient } = require("redis");
  const client = createClient({ legacyMode: true });
  client.connect().catch(console.error);

  client.on('connect'     , () => console.log('DEBUG: redis: connect'));
  client.on('ready'       , () => console.log('DEBUG: redis: ready'));
  client.on('reconnecting', () => console.log('DEBUG: redis: reconnecting'));
  client.on('error'       , () => console.log('DEBUG: redis: error'));
  client.on('end'         , () => console.log('DEBUG: redis: end'));

  app.use(
    session({
      store: new RedisStore({ client: client }),
      saveUninitialized: false,
      secret: "keyboard cat",
      resave: false,
    })
  )
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!