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

Safe HaskellNone
LanguageHaskell2010

Web.Apiary.Heroku

Synopsis

Documentation

heroku :: MonadIO m => (Int -> Application -> m a) -> HerokuConfig -> EApplication `[Heroku]` m -> m a Source

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

 server (run 3000) . runApiary def $ foo

to

 heroku run def . runApiary def $ foo

this function provide:

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

herokuWith :: MonadIO m => Initializer m `[Heroku]` exts -> (Int -> Application -> m a) -> HerokuConfig -> EApplication exts 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