wheb-redis

Redis connection for Wheb https://github.com/hansonkd/Wheb-Framework

Latest on Hackage:0.0.1.0

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed by Kyle
Maintained by me@khanson.io

Implements basic functionality for:

Gives instances of Auth, Session and Cache backends for Wheb.

In action:

Use with language extensions OverloadedStrings

 import Web.Wheb
 import Web.Wheb.Plugins.Redis

 data MyCtx = MyCtx RedisContainer

 instance RedisApp MyCtx where
   getRedisContainer (MyCtx rc) = rc

 main :: IO ()
 main = do
   opts <- generateOptions $ do
       r <- initRedis defaultConnectInfo
       addGET "home" rootPat ((runRedis $ get "hello") >>= (text . spack))
       return (MyCtx r, ())

   runRawHandler opts $ do
       runRedis $ set "hello" "world"

   runWhebServer opts
Depends on 6 packages:
Used by 1 package:
comments powered byDisqus