From 412defd40def44f809ad68434600d0a3a12a53bb Mon Sep 17 00:00:00 2001 From: Julien Tanguy Date: Fri, 4 Sep 2015 18:07:09 +0200 Subject: [PATCH] Documentation --- Changelog | 9 +++++++++ README.md | 27 ++++++++++++++++++++++----- default.nix | 2 +- quickwebapp.cabal | 4 ++-- 4 files changed, 34 insertions(+), 8 deletions(-) diff --git a/Changelog b/Changelog index e433801..61ba3e7 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,12 @@ v 1.0 ===== Initial release + +v3.0 +==== +New release, powered by servant +- Side by side input and output +- Form submitted via ajax +- httpie and curl samples + + diff --git a/README.md b/README.md index 0919da1..4d92b53 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,29 @@ quickwebapp =========== -A quick-and-dirty api generator, for any function `a -> b` which can be wrapped -inside a function `ByteString -> ByteString`. -It is inspired from the 'interact' function from 'Prelude'. +A quick-and-dirty api generator, for any function `a -> Either String b`. + +It is inspired from the `interact` function from the Prelude. ~~~{haskell} -interactWeb reverse +interactWeb (reverse :: String -> String) +~~~ + +This creates a server listening on port 8080. You can change the port with the `PORT` env variable. + +You can query it via a browser at or by using +curl/httpie + +httpie +------ + +~~~{bash} +http :8080 input="" ~~~ -This creates a server listening on port 3000. +curl +---- + +~~~{bash} +curl localhost:8080 -d input="" +~~~ diff --git a/default.nix b/default.nix index 4db33cc..6ebd5b9 100644 --- a/default.nix +++ b/default.nix @@ -3,7 +3,7 @@ }: mkDerivation { pname = "quickwebapp"; - version = "3.0.0.1"; + version = "3.0.0.2"; src = ./.; libraryHaskellDepends = [ aeson base bytestring containers either lucid servant servant-lucid diff --git a/quickwebapp.cabal b/quickwebapp.cabal index 7815b1d..fad9a6a 100644 --- a/quickwebapp.cabal +++ b/quickwebapp.cabal @@ -1,5 +1,5 @@ name: quickwebapp -version: 3.0.0.1 +version: 3.0.0.2 synopsis: A quick webapp generator for any file processing tool description: A quick-and-dirty api generator, inspired from the 'interact' function from @@ -15,7 +15,7 @@ author: Julien Tanguy maintainer: julien.tanguy@jhome.fr category: Web build-type: Simple -extra-source-files: Changelog +extra-source-files: Changelog, README.md cabal-version: >=1.10 bug-reports: https://github.com/jtanguy/quickwebapp/issues