~alcinnz/amphiarao

ref: 505d1225cb268cff416cc3a01cc55f2932f92861 amphiarao/src/Main.hs -rw-r--r-- 489 bytes
505d1225 — Adrian Cochrane init 3 years ago
                                                                                
505d1225 Adrian Cochrane
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{-# 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)