Closed devalexqt closed 3 years ago
Hi @devalexqt 👋
As far as I know there is currently no dedicated Deno session middleware for Opine.
If you’re interested in contributing to the Deno userland, this could perhaps be a good opportunity to do so!
This is a session
module in the Deno registry (https://deno.land/x/session@1.1.0) but it currently only supports Oak and Attain servers, it doesn’t look like it would be much work to have it also support Opine.
An alternative is to see if you can use PIKA, JSPM or esm.sh to use an existing Express session middleware, converted to ESM. Once a module is ESM, using it as a middleware is the same as you would for Node Express.
I have put in a PR to add Opine support to the session
module, see https://github.com/denjucks/session/pull/15.
Thanks!
This is an issue for the userland to solve rather than something in Opine itself, so closing for now. Shout if feel otherwise!
How to use session middleware?