jcs224 / hono_sessions

Cookie-based sessions for Hono applications
https://jsr.io/@jcs224/hono-sessions
MIT License
53 stars 6 forks source link

Support for redis via ioredis #8

Closed killerdroid99 closed 1 month ago

killerdroid99 commented 5 months ago

Can the session store be implemented with redis using ioredis?

jcs224 commented 5 months ago

A driver can be made for ioredis, but I'm wondering if this would be better as an external driver than part of the hono-sessions library. For the core package, I only want to support databases included with the core of the runtime, such as Bun SQLite or Deno KV. I may put guidance in the readme for how to create your own storage driver. This is similar in approach to Golang's Gorilla Sessions.

I found this Redis driver for hono-sessions, it's node-redis instead of ioredis though.

https://github.com/crossunit/connect-redis-hono

jcs224 commented 1 month ago

Here's an ioredis port

https://www.npmjs.com/package/hono-sessions-redis