diff --git a/Main.hs b/Main.hs index e581356..1cb9a03 100644 --- a/Main.hs +++ b/Main.hs @@ -2,8 +2,14 @@ module Main where import Application + +import Control.Applicative +import System.Environment import Network.Wai.Handler.Warp import Network.Wai.Middleware.RequestLogger + main :: IO () -main = app (run 3000 . logStdout) +main = do + port <- maybe 3000 read <$> lookupEnv "PORT" + app (run port . logStdout) \ No newline at end of file