webapp

Haskell web app framework based on WAI & Warp https://github.com/natesymer/webapp

Latest on Hackage:0.6.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

MIT licensed and maintained by Nathaniel Symer

Web.App - WAI web framework

Build Status

Web.App is a general, minimalist Haskell web framework. See Haddock documentation and example.hs.

Usage notes

  1. Web.App can either be ran standalone (i.e. look ma, no nginx!) or behind other server programs.

  • To bind to privileged ports, your program must be executable as root. Privileges are resigned after the port is bound.
  • Web.App uses Warp under the hood to serve a WAI app based on provided routes.
  • SSL & HTTP2 are supported.
  1. Web.App provides a function called webappMain (as well as a series of other similarly named functions) that start your app.

  • Your program's main function should finish with a call to one of them.

  1. Web.App also provides command line options for controlling the HTTP server.

  • It also provides

Changes

webapp changelog

v 0.0.1

  • Initial release

v 0.0.2

  • Fix omitted module in webapp.cabal: Web.App.Monad.Internal

v 0.1.0

  • Included a new example: a counter app with an additional CLI parser.
  • Implemented a "util" CLI subcommand where you can "mount" an optparse-applicative @Parser@. See example.
  • Fixed termination handlers. Previously, they weren't installed when using HTTPS due to a bug in warp-tls. This has been remedied. Additionally, these handlers would destroy the initial state, rather than the current state from the @TVar@.

v 0.2.0

  • Complete rewrite
  • New WAI-based web framework
    • Routing with captures, regexes, and literals
    • Streaming body based around writeBody function
      • Allow data structures to be streamed via the 'ToStream' typeclass.
    • Typesafe parameter coersion

v 0.2.1

- `stream` function can now optionally flush. `stream'` will always flush. This may improve list streaming functionality.

v 0.4.0

- Breaking change; refactor internals & simplify `Web.App.RouteT`
comments powered byDisqus