I am trying to follow the example given here:
const mongoose = require("mongoose");
const session = require("express-session");
const MongoStore = require("connect-mongo")(session);
but this fails immediately with:
ServerMiddleware Error: Class constructor MongoStore cannot be invoked without 'new'
on the third line.
Is MongoStore documented somewhere? Is there a better example/tutorial I should following?