Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to use it with mongodb #33

Closed
jackple opened this issue May 11, 2017 · 2 comments
Closed

how to use it with mongodb #33

jackple opened this issue May 11, 2017 · 2 comments

Comments

@jackple
Copy link

jackple commented May 11, 2017

Is there a demo

@Secbone
Copy link
Owner

Secbone commented May 11, 2017

@jackple no demo for MongoDB yet, but it is very similar to Redis demo in README docs.
For example, you can replace Redis in get method with MongoDB like this:

async get(sid) {
        // this just an instance, something like this
        let data = await this.mongo.findOne({sessionid: sid});
        return JSON.parse(data);
}

@jackple
Copy link
Author

jackple commented May 11, 2017

@Secbone Thanks! I will try later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants