What is the difference between session middleware and cookieSession middleware in nodejs?

  node.js, question

What is the difference between session middleware and cookieSession middleware in nodejs?

sessionMiddleware does not know which of the following do you mean:
1)https://npmjs.org/package/session
2)https://npmjs.org/package/sessions
CookieSession I think what you mean should be:
3)https://npmjs.org/package/connect-cookie-session

Just look at the documents or source code provided by npm and see if there are any differences. You can analyze them more yourself.

1) The source code is 404 on github, so I don’t know. I don’t seem to have used it either. I don’t want to install to look at the code.
2) is a full-featured session manager, which provides physical files, MySQL, Cookie directly stored in the process memory for session storage
3) Same as the purpose of 2, but simpler, providing only the client Cookie as a storage method.

Session is actually to save some data that users need to use in real time during the session. The data needs to be stored locally. These middleware encapsulate the logic of real data storage and provide corresponding operation interfaces for storage, update, retrieval and deletion.