update command line options

This commit is contained in:
Emily Martins 2022-06-29 10:35:34 +02:00
parent 8ce030cf24
commit be1fd594b6
2 changed files with 17 additions and 5 deletions

View file

@ -35,12 +35,12 @@ import Text.Printf (printf)
@since 0.2.0
-}
type API =
-- /query-script/:name
-- POST /query-script/:name
"query-script"
:> Capture "name" Text
:> ReqBody '[JSON] Aeson.Value
:> Post '[JSON] Aeson.Value
-- /info
-- GET /info
:<|> "info"
:> Get '[JSON] ServerInfo
@ -106,5 +106,5 @@ runServer revision builders options = do
printf "[info] Running 'agora-scripts' on :%d\n" (Warp.getPort settings)
Servant.serve (Proxy @API) handler
& corsMiddleware
& (if options.enableCorsMiddleware then corsMiddleware else id)
& Warp.runSettings settings