Closed eloquence closed 6 years ago
Looks like the build failure is due to the Travis setup still testing some really old Node versions which fail on some modules. I'd recommend removing those; requiring Node 4 as a minimum (8.9.0 is LTS now) seems pretty reasonable.
Sounds reasonable. Thanks for the PR.
I'm gonna merge it right now, but the idea for the storage is to have a general interface.
So we can build several storage connectors (Redis, MongoDB, lokiJS etc.) like express-session
does..
The on-disk database may not be desirable for many use cases. A plain object that can be persisted outside of this module seems like a good fallback. To allow seamless change from one to the other, the interfaces are identical, i.e. promises are used even when they are not strictly necessary.
This commit also adds tests, reusing several existing functions to verify that the in-memory database operates as expected.