Created
October 5, 2010 13:16
-
-
Save miikka/611529 to your computer and use it in GitHub Desktop.
Snap project template.
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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Snap.Types | |
import Snap.Http.Server | |
import Snap.Util.FileServe | |
main = do | |
let handler = route [ ("", writeBS "Hello world!") | |
, ("public", fileServe "public") | |
] | |
-- address, port, hostname, access log, error log, handler | |
httpServe "*" 8080 "localhost" Nothing Nothing handler |
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
Name: snap-helloworld | |
Version: 0.1 | |
Category: Web | |
Build-type: Simple | |
Cabal-version: >=1.6 | |
Executable snap-helloworld | |
HS-Source-dirs: src | |
Main-is: Main.hs | |
Other-modules: | |
Build-depends: base ==4.*, | |
snap-core, | |
snap-server |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment