Skip to content

Instantly share code, notes, and snippets.

@duairc
Created June 11, 2010 19:28
Show Gist options
  • Save duairc/434927 to your computer and use it in GitHub Desktop.
Save duairc/434927 to your computer and use it in GitHub Desktop.
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Data.ByteString.Char8 (ByteString)
import qualified Data.ByteString.Char8 as B
import Data.Maybe
import Control.Applicative
import Snap.Types
import Snap.Util.FileServe
import Text.Templating.Heist
import Server
splices :: [(ByteString, Splice Snap)]
splices = []
main :: IO ()
main = templateServer "templates" splices emptyServerConfig $ \render ->
ifTop (render "index")
<|> dir "static" (fileServe "static")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment