nero: Lens-based HTTP toolkit

[ bsd3, library, web ] [ Propose Tags ]

This package represents the core of the Nero HTTP toolkit.

This an initial alpha release with just basic routing and HTTP parameters handling.

Check the README for a more detailed explanation.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1, 0.1.1, 0.2, 0.3, 0.3.1
Change log CHANGELOG.md
Dependencies base (>=4.6 && <4.9), bytestring, containers (>=0.5), lens, safe, text [details]
License BSD-3-Clause
Copyright Copyright (C) 2015 J. Daniel Navarro
Author Danny Navarro
Maintainer j@dannynavarro.net
Category Web
Home page https://github.com/jdnavarro/nero
Bug tracker https://github.com/jdnavarro/nero/issues
Source repo head: git clone git://github.com/jdnavarro/nero.git
Uploaded by jdnavarro at 2015-03-30T18:58:26Z
Distributions
Reverse Dependencies 3 direct, 0 indirect [details]
Downloads 3063 total (13 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-03-30 [all 1 reports]

Readme for nero-0.1.1

[back to package description]

Nero

An experimental Haskell toolkit for Lens-based web application development.

⚠️ The following is for now a declaration of intentions only. Expect wild changes in the API in the near future.

  • Not a framework: it could be considered an anti-framework, micro-framework, or just a "library", in the sense that it provides a set of utilities to build custom web applications instead of being a framework that creates web applications from user provided code.

  • Pay for what you eat: instead of coming with everything and the kitchen sink, it provides the bare minimum to write applications without almost any implicit behavior. At the same time, it offers diverse paths to grow with you as applications become more complex.

  • Unopinonated: there is no preferred routing method, HTML templating library, session management, web server or database adapter. It comes with some defaults to alleviate the paradox of choice, but most components are expected to be easily swapped in and out with plain 3rd party Haskell libraries writing thin adapters if at all needed.

  • Power of Haskell and Lens: the Lens-based API enables styles familiar to imperative programmers Lens while being purely functional under the hood. Haskell veterans can take advantage of the powerful lens combinators.

Hackage Version Build Status

Example

import Nero

app :: Request -> Maybe Response
app = request ^? _GET . match ("/hello/" <> text) <&> \name ->
    ok $ "<h1>Hello " <> name <> "</h1>"

Check more examples with its corresponding tests in the examples directory.