quickwebapp-3.0.0.2: A quick webapp generator for any file processing tool

Safe HaskellNone
LanguageHaskell2010

QuickWebApp

Description

A quick-and-dirty api generator, for any function a -> Either String b.

If you only have a function f :: a -> b, simply run interactWeb (Right .f)

Synopsis

Documentation

interactWeb :: (FromText a, ToText b) => (a -> Either String b) -> IO () Source

Tranform a function into a webapp. The inputs and outputs must implement FromText and ToText, respectively.

You can query it via a browser at http://localhost:8080 or by using curl/httpie

http :8080 input="<your input string>"
curl localhost:8080 -d input="<your input string>"