Safe Haskell | None |
---|---|
Language | Haskell98 |
Basic implementation of MongoDB connection.
Adds default instances for SessionApp
and AuthApp
for MongoApp
.
- runAction :: (MongoApp g, MonadIO m) => Action IO a -> WhebT g s m a
- initMongo :: Text -> Text -> InitM g s m MongoContainer
- catchResult :: MonadIO m => IO b -> WhebT g s m b
- class MongoApp a where
- getMongoContainer :: a -> MongoContainer
- data MongoContainer
- module Database.MongoDB
Documentation
runAction :: (MongoApp g, MonadIO m) => Action IO a -> WhebT g s m a Source
Run a MongoDB Action Monad in WhebT
initMongo :: Text -> Text -> InitM g s m MongoContainer Source
Initialize mongo with "host:post" and default database.
catchResult :: MonadIO m => IO b -> WhebT g s m b Source
Push an error from Mongo to a 500 Error.
getMongoContainer :: a -> MongoContainer Source
module Database.MongoDB