# Minion. Experimental HTTP router

**URL:** <https://discourse.haskell.org/t/minion-experimental-http-router/10430>\
**Category:** Show and Tell\
**Created:** [September 29, 2024, 6:13pm UTC](https://discourse.haskell.org/t/minion-experimental-http-router/10430 "2024-09-29T18:13:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![goosedb](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.haskell.org/goosedb/32/4310_2.png) [@goosedb](https://discourse.haskell.org/u/goosedb)\
**Post date:** [September 29, 2024, 6:13pm UTC](https://discourse.haskell.org/t/minion-experimental-http-router/10430/1 "2024-09-29T18:13:38Z")

</div>

I’ve just released library that helps to build web applications. It is situated between scotty and servant, avoiding complex types (where possible), while at the same time providing a typed interface and introspection capabilities.

Here is “hello, world” using Minion. More can be found at [Hackage](https://hackage.haskell.org/package/minion-0.1.0.0) (Web.Minion.Examples.\*) and [Github](https://github.com/goosedb/minion)

```haskell
{-# 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 about
    , "hello" 
       /> capture @String "name" 
       .> handlePlainText @String GET hello
    ]
  where 
    about = pure "Hello-World Minion server"
    hello name = pure $ "Hello, " <> name <> "!"

```
