minion-wai-extra: Minion wrappers for wai-extra

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

Warnings:


[Skip to Readme]

Properties

Versions 0.1.0.0, 0.1.0.0
Change log None available
Dependencies base (>=4.16 && <5), binary, bytestring, http-media, http-types, minion, minion-wai-extra, resourcet, string-conversions, text, transformers, wai, wai-extra, warp [details]
License MIT
Author goosedb
Maintainer goosedb@yandex.ru
Category Web
Uploaded by goosedb at 2024-09-29T01:52:43Z

Modules

[Index] [Quick Jump]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for minion-wai-extra-0.1.0.0

[back to package description]

Minion

Minion is Haskell library for developing web applications. It stands between Scotty and Servant

Scotty Minion Servant
As simple as ABC Yes No No
At term level Yes Yes No
Typesafe No Yes Yes
Introspectable No Yes Yes
Generated client No No Yes

Since Minion defines servers at the term level, it's easier to start and without excess verbosity.

{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE OverloadedLists #-}
module Main where

import Web.Minion
import Network.Wai.Handler.Warp qualified as Warp

main :: IO ()
main = Warp.run 9001 app

app :: ApplicationM IO
app = serve api 

api :: Router Void IO
api = "api" /> 
    [ "about" /> handlePlainText @String GET (pure "Hello-World Minion server")
    , "hello" /> capture @String "name" 
              .> handlePlainText @String GET (\name -> pure $ "Hello, " <> name <> "!")
    ]

Documentation and examples can be found on Hackage

Minion ecosystem also contains following libraries: