Update Main.hs file with Scotty example code.
This commit is contained in:
parent
b26291d014
commit
9b7a19f4d2
@ -1,4 +1,9 @@
|
|||||||
module Main where
|
{-# LANGUAGE OverloadedStrings #-}
|
||||||
|
|
||||||
|
import Web.Scotty
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = putStrLn "Hello, Haskell!"
|
main = scotty 3000 $
|
||||||
|
get "/:word" $ do
|
||||||
|
beam <- pathParam "word"
|
||||||
|
html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]
|
||||||
Loading…
x
Reference in New Issue
Block a user