index.js - line 342 - why is it calling the 'createSession()' function on store?
See original GitHub issueI am implementing a custom session store (on Mongo), and I was getting an error about a createSession()
function not being implemented. I further investigated and found out that this method was not implemented by the MemoryStore
as well, but that it was implemented in the /session/store.js
file.
Is that a mistake?
Why not just put req.session = new Session(req, sess);
there instead? It makes much more sense…
Issue Analytics
- State:
- Created 9 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
JavaScript calling functions in another file - Stack Overflow
I have a JavaScript Code A running in node.js continously without restarting. As it runs, it creates its own data and stores it...
Read more >Index - API Manual
# Page Tags and summary
8 AnalyserNode.getByteFrequencyData() A Uint8Array .
9 AnalyserNode.getByteTimeDomainData() A Uint8Array .
10 AnalyserNode.getFloatFrequencyData() A Float32Array .
Read more >Reference Guide - IBM
1.1 Reference Guide. Contains detailed information about the individual components of IBM Tivoli Directory Integrator. 7.1.1: Connectors, Function Components, ...
Read more >Diff - 51fb98171a..c1ab029096 - chromium/src - Git at Google
-bool VolumeSupportsADS(const FilePath& path); - -// Returns true if the ZoneIdentifier is correctly set to "Internet" (3). -// Note that this function must...
Read more >Oracle to Aurora PostgreSQL Migration Playbook - Awsstatic
Support for AWS Secrets Manager integration You can store the database ... Unlike Oracle triggers, PostgreSQL triggers must call a function and do...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The documentation (Readme) does not explain correctly in my opinion. It should not say the store must extend from an
EventEmitter
but from therequire("express-session").Store
. This way you only need to implement the methods as described in the docs (get
,set
anddestroy
). OtherwisecreateSession
is needed (which means you need to createresetMaxAge
,touch
,save
, … onreq.session
).But
store#createSession
is not listed in Readme, it’s ratherstore#set
that plays this role https://github.com/expressjs/session#storesetsid-session-callbackedit: it’s supposed to set session in req object