The main engine running the HTTP server, there is nothing about APIs here
data Logging : TypeLog levels for the application
record ServerConfig : TypeMkServerConfig : Logging -> String -> Int -> ServerConfig.hostname : ServerConfig -> String.logging : ServerConfig -> Logging.port : ServerConfig -> Int.logging : ServerConfig -> Logginglogging : ServerConfig -> Logging.hostname : ServerConfig -> Stringhostname : ServerConfig -> String.port : ServerConfig -> Intport : ServerConfig -> IntlogLvl : ServerConfig => HasIO io => Logging -> String -> io ()logDebug : ServerConfig => HasIO io => String -> io ()logVerbose : ServerConfig => HasIO io => String -> io ()log : ServerConfig => HasIO io => String -> io ()localhost : Int -> ServerConfigecho : PlainRequest -> IO PlainResponseThe most basic echo server takes a plein request and returns a plain response
http : ServerConfig -> (PlainRequest -> IO PlainResponse) -> IO ()To create a server, we need a hostname, a port and a handler.
The server then runs asynchronously on node.