Statements like this do not understand why they are written and how such statements should find information.

  node.js, question

图片描述

Statements like this do not understand why they are written and how such statements should find information.

If you look up the information, you have to look up the usage of the api require ().
2. The require () here should include the js file connect-mongo.js as a module, and then you can use the interface provided by the connect-mongo.js file inside.
3. The require (‘connect-mongo’) (session) directly calls the externally provided interface and passes the session as a parameter.
4. finally assign the value to MongoStore.