Fix the server

This commit is contained in:
evancz 2013-04-28 22:17:51 -07:00
parent 6ca373bdeb
commit be72e868ee
2 changed files with 5 additions and 4 deletions

View file

@ -16,7 +16,8 @@ runtime = "/elm-" ++ showVersion version ++ ".js"
serve :: String -> IO ()
serve libLoc = do
putStrLn ("Elm Server " ++ showVersion version ++ ": running at <http://localhost:8000>")
putStrLn ("Elm Server " ++ showVersion version ++
": running at <http://localhost:8000>")
putStrLn "Just refresh a page to recompile it!"
simpleHTTP nullConf $ do
_ <- compressedResponseFilter
@ -43,7 +44,7 @@ main = getArgs >>= parse
parse :: [String] -> IO ()
parse ("--help":_) = putStrLn usage
parse ("--version":_) = putStrLn ("The Elm Server " ++ showVersion version)
parse [] = serve =<< Elm.runtimeLocation
parse [] = serve =<< Elm.runtime
parse [arg]
| "--runtime-location=" `isPrefixOf` arg =
serve . tail $ dropWhile (/='=') arg

View file

@ -1,5 +1,5 @@
Name: elm-server
Version: 0.7
Version: 0.8
Synopsis: The Elm language server.
Description: This package provides a standalone, Happstack-based Elm server.
@ -35,4 +35,4 @@ Executable elm-server
happstack-server == 7.1.1 || == 7.0.2,
deepseq,
filepath,
Elm >= 0.7
Elm >= 0.8