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

135
Views
Error and "strange" parameter in context of require statements related to the node modules "express-session" and "mongo-connect"

In a tutorial, I found this code:

const session = require('express-session');
const MongoStore = require('connect-mongo')(session);

What does the (session) do after the require statement? Is it a kind of parameter for the const MongoStore? I do not understand the "mechanism" here. Thank you very much in advance for some clarification!

Also, there is an error telling me that I am supposed to use a new statement with MongoStore. However, the code in the video tutorial is working fine. Is this error maybe due to changes in a more recent version of the "mongo connect" module?

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!