RejectedSoftware Forums

Sign up

vibe.d 0.8.2 released

The major changes in this release are HTTP forward proxy support,
handling incoming HTTP requests on custom transports and a MongoDB based
session store. On top of that, there are many smaller improvements in
the HTTP server, web/REST generator, JSON/BSON support and the TLS sub
system.

Change log:
https://vibed.org/blog/posts/vibe-release-0.8.2

DUB package:
https://code.dlang.org/packages/vibe-d/0.8.2

Re: vibe.d 0.8.2 released

Thanks Sönke. Is there a MongoDB based session store tutorial or example code?

On Tue, 12 Dec 2017 20:44:46 +0100, Sönke Ludwig wrote:

The major changes in this release are HTTP forward proxy support,
handling incoming HTTP requests on custom transports and a MongoDB based
session store. On top of that, there are many smaller improvements in
the HTTP server, web/REST generator, JSON/BSON support and the TLS sub
system.

Change log:
https://vibed.org/blog/posts/vibe-release-0.8.2

DUB package:
https://code.dlang.org/packages/vibe-d/0.8.2

Re: vibe.d 0.8.2 released

On Thu, 14 Dec 2017 07:51:22 GMT, zafer wrote:

Thanks Sönke. Is there a MongoDB based session store tutorial or example code?

I've added a simple example now to the module documentation (not online yet, though). This is the gist of it:

auto store = new MongoSessionStore("mongodb://127.0.0.1/mydb", "sessions");
store.expirationTime = 5.hours;

auto settings = new HTTPServerSettings("127.0.0.1:8080");
settings.sessionStore = store;

auto router = new URLRouter;
...

listenHTTP(settings, router);

Afterwards the usual session mechanism should work normally (req.session, res.startSession, or SessionVar!T in the web interface).