{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Main where
import Happstack.Lite
import Control.Concurrent.MVar
import qualified Data.Map.Strict as M
import Webdriver
import Data.UUID
main :: IO ()
main = do
sessions <- newMVar emptySessions
serve Nothing $ msum [
dir "webdriver" $ dir "v1" $ serveWebdriver sessions,
serveHome
]
emptySessions :: M.Map UUID WDSession
emptySessions = M.empty
serveHome = ok $ toResponse ("Hello, world!" :: String)