helic-0.5.2.0: Clipboard Manager
Safe HaskellNone
LanguageHaskell2010

Helic.Net.Api

Description

HTTP API of the Daemon, Internal

Synopsis

Documentation

type Api = "event" :> (Get '[JSON] [Event] :<|> ((ReqBody '[JSON] Event :> PostCreated '[JSON] NoContent) :<|> (ReqBody '[JSON] Int :> PutAccepted '[JSON] (Maybe Event)))) Source #

The Servant API of the daemon, providing endpoints for getting all events and creating one.

server :: Member History r => ServerT Api (Sem r) Source #

The server implementation.

defaultPort :: Int Source #

The default port, 9500.

serve :: Members [History, Reader NetConfig, Sync ServerReady, Log, Interrupt, Final IO] r => Sem r () Source #

Run the daemon API.