Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Heroku
- data HerokuConfig = HerokuConfig {}
- runHeroku :: MonadIO m => (Int -> Application -> m a) -> HerokuConfig -> ApiaryT `[Heroku]` [] IO m () -> m a
- runHerokuWith :: MonadIO m => (Int -> Application -> m a) -> Initializer m `[Heroku]` exts -> HerokuConfig -> ApiaryT exts [] IO m () -> m a
- 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
- getHerokuEnv :: Has Heroku exts => Text -> Extensions exts -> IO (Maybe Text)
- getHerokuEnv' :: Text -> Heroku -> IO (Maybe Text)
Documentation
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.
runApiaryTWith id (run 3000) exts def $ foo
to
runHerokuTWith id run exts def $ foo