Fix quickstart example (#25)

This commit is contained in:
Connor Prussin 2017-07-13 23:43:20 -07:00 committed by GitHub
parent 35d3f13c3a
commit b5f29a2f7a

View File

@ -26,22 +26,17 @@ bower install --save purescript-httpure
```purescript ```purescript
module Main where module Main where
import Prelude (map, ($)) import Prelude (pure, ($))
import Control.Monad.Eff.Console as Console import Control.Monad.Eff.Console as Console
import Data.StrMap as StrMap
import HTTPure as HTTPure import HTTPure as HTTPure
main :: HTTPure.HTTPureM (console :: Console.CONSOLE) main :: HTTPure.ServerM (console :: Console.CONSOLE)
main = do main = do
HTTPure.serve 8080 routes $ Console.log "Server now up on port 8080" HTTPure.serve 8080 router $ Console.log "Server now up on port 8080"
where where
routes = router _ = pure $ HTTPure.OK StrMap.empty "hello world!"
[ HTTPure.Get "/"
{ status: \_ -> 200
, headers: \_ -> []
, body: \_ -> "hello world!"
}
]
``` ```
## Documentation ## Documentation