Created
April 4, 2015 04:06
-
-
Save markdcummings/16982872a87f06822d67 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Simple web server using spock (http://www.spock.li/), a Sinatra-esque web | |
-- framework for Haskell. | |
-- | |
-- https://hackage.haskell.org/package/Spock | |
-- https://github.com/agrafix/Spock | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Data.Monoid | |
import Web.Spock.Safe | |
main :: IO () | |
main = | |
runSpock 8080 $ spockT id $ | |
do get root $ | |
text "Hello World!" | |
get ("vulcan-salute" <//> var) $ \name -> | |
text ("dif tor heh smusma " <> name <> "!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment