Skip to content

Commit

Permalink
Customize listen port
Browse files Browse the repository at this point in the history
  • Loading branch information
koterpillar committed Jan 14, 2015
1 parent 3f011b6 commit c789f99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ siteAddress = do
main :: IO ()
main = do
address <- siteAddress
simpleHTTP' runApp nullConf $ implSite (T.pack address) "" site
listenPort <- lookupEnv "LISTEN_PORT"
let conf = nullConf { port = read $ fromMaybe "8000" listenPort }
simpleHTTP' runApp conf $ implSite (T.pack address) "" site

index :: AppPart Response
index = articleList $ const True
Expand Down

0 comments on commit c789f99

Please sign in to comment.