apiary-1.1.0: Simple and type safe web framework that can be automatically generate API documentation.

Safe HaskellNone
LanguageHaskell2010

Web.Apiary.Heroku

Contents

Synopsis

Documentation

data Heroku Source

Instances

configuration

runner

runHeroku :: MonadIO m => (Int -> Application -> m a) -> HerokuConfig -> ApiaryT `[Heroku]` [] IO m () -> m a Source

use this function instead of runApiary in heroku app. since 0.18.0.

this function provide:

  • set port by PORT environment variable.
  • getHerokuEnv function(get config from environment variable or heroku config command).

runHerokuWith :: MonadIO m => (Int -> Application -> m a) -> Initializer m `[Heroku]` exts -> HerokuConfig -> ApiaryT exts [] IO m () -> m a Source

runHerokuTWith :: (MonadIO m, Monad actM) => (forall b. actM b -> IO b) -> (Int -> Application -> m a) -> Initializer m `[Heroku]` exts -> HerokuConfig -> ApiaryT exts [] actM m () -> m a Source

use this function instead of serverWith in heroku app. since 0.17.0.

 serverWith exts (run 3000) . runApiary def $ foo

to

 herokuWith exts run def . runApiary def $ foo

extension functions

getHerokuEnv Source

Arguments

:: Has Heroku exts 
=> Text

heroku environment variable name

-> Extensions exts 
-> IO (Maybe Text) 

getHerokuEnv' Source

Arguments

:: Text

heroku environment variable name

-> Heroku 
-> IO (Maybe Text)