Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Nodejs Express MySQL Session store

Nodejs Express MySQL Session store

Problem

I've been using connect-Mysql-session for storing sessions in a MySQL db, but it's not being maintained anymore and have not been updated for 2 years.

Are there any other mysql session store modules for express that's being actively maintained?

And if not, could i still use MySQL db for storing user information etc and use another kind of db to store the session? Like Redis or MongoDB? Is this good practice?

Problem courtesy of: georgesamper

Solution

Connect-session DB extension plugin is simple piece of software and only maintenance needed is usually related to maintain compatibility with DB driver and update dependencies in package.json. So it can work for a long time without maintenance.

If you are not comfortable with it, you have several options:

  1. There are some forks of the repo on github which are better updated (at least dependencies), so you can choose one and use that instead of the original, which is not maintained probably any more. You can also fork it yourself and update it as you like.

  2. You can switch to Redis, Mongo or whatever you like or have to serve sessions. It is valid and usual solution to have different DB for different purposes, but you get additional technology and you have to maintain it.

Solution courtesy of: ivoszz

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Nodejs Express MySQL Session store

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×