mig: Build lightweight and composable servers

[ bsd3, library, web ] [ Propose Tags ] [ Report a vulnerability ]

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.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3, 0.2.0.0, 0.2.0.1, 0.2.1.0
Dependencies aeson, base (>=4.7 && <5), blaze-html, bytestring, case-insensitive, containers, exceptions, extra, filepath, http-api-data, http-media, http-types, insert-ordered-containers, lens, lrucache, mtl, openapi3, safe, text, time, transformers [details]
License BSD-3-Clause
Copyright 2023 Anton Kholomiov
Author Anton Kholomiov
Maintainer anton.kholomiov@gmail.com
Category Web
Home page https://github.com/anton-k/mig#readme
Bug tracker https://github.com/anton-k/mig/issues
Source repo head: git clone https://github.com/anton-k/mig
Uploaded by AntonKholomiov at 2023-11-29T07:01:38Z
Distributions NixOS:0.2.1.0
Reverse Dependencies 5 direct, 0 indirect [details]
Downloads 279 total (21 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2023-11-29 [all 1 reports]

Readme for mig-0.2.1.0

[back to package description]

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.