yesod-default 1.1.0.2 → 1.1.1
raw patch · 2 files changed
+10/−4 lines, 2 filesdep +safePVP ok
version bump matches the API change (PVP)
Dependencies added: safe
API changes (from Hackage documentation)
Files
- Yesod/Default/Main.hs +8/−3
- yesod-default.cabal +2/−1
Yesod/Default/Main.hs view
@@ -15,6 +15,9 @@ import Network.Wai.Middleware.Autohead (autohead) import Network.Wai.Middleware.Jsonp (jsonp) import Control.Monad (when)+import System.Environment (getEnvironment)+import Data.Maybe (fromMaybe)+import Safe (readMay) #ifndef WINDOWS import qualified System.Posix.Signals as Signal@@ -43,7 +46,7 @@ } app -- | Run your application continously, listening for SIGINT and exiting--- when recieved+-- when received -- -- > withYourSite :: AppConfig DefaultEnv -> Logger -> (Application -> IO a) -> IO () -- > withYourSite conf logger f = do@@ -81,7 +84,9 @@ -> IO (Int, Application) defaultDevelApp load getApp = do conf <- load- let p = appPort conf- putStrLn $ "Devel application launched: http://localhost:" ++ show p+ env <- getEnvironment+ let p = fromMaybe (appPort conf) $ lookup "PORT" env >>= readMay+ pdisplay = fromMaybe p $ lookup "DISPLAY_PORT" env >>= readMay+ putStrLn $ "Devel application launched: http://localhost:" ++ show pdisplay app <- getApp conf return (p, app)
yesod-default.cabal view
@@ -1,5 +1,5 @@ name: yesod-default-version: 1.1.0.2+version: 1.1.1 license: MIT license-file: LICENSE author: Patrick Brisbin@@ -34,6 +34,7 @@ , unordered-containers , hamlet >= 1.1 && < 1.2 , data-default+ , safe if !os(windows) build-depends: unix