Build lightweight and composable servers.
The Core for the mig server library. With library mig we can build lightweight and composable servers. There are only couple of combinators to assemble servers from parts. It supports generic handler functions as servant does. But strives to use more simple model for API. It does not go to describing Server API at type level which leads to simpler error messages.
quick start guide at https://anton-k.github.io/mig/
examples directory for more servers: at https://github.com/anton-k/mig/tree/main/examples/mig-example-apps#readme
reference for the main functions: https://anton-k.github.io/mig/09-reference.html
Core mig library
Core mig library provides tools to build HTTP servers and APIs. With this library we can build lightweight and composable servers. It is sort of servant for Simple/Boring haskell.
We build servers with type-safe DSL and we can convert a server to low-level server representation and to OpenApi schema.
Servers can be rendered to low level representation of ServerFun
:
type ServerFun m = Request -> m (Maybe Response)
There is library mig-wai
that can convert ServerFun
to Wai.Application
and we can run it with warp
(see library mig-server
for that).
The HTTP Api can be converted to OpenApi
value defined in openapi3
library.