module Main where

import           Network.Wai.Handler.Warp
import           Rest.Driver.Wai
import           System.Environment

import           CIDemo.Api
import           CIDemo.Types

main :: IO ()
main = do
        port <- getEnv "CIDEMO_PORT"
        let env = Environment
            app = apiToApplication (runCIDemo env) api
        run (read port) $ app
