The loli package

[Tags:bsd3, deprecated, library]
Deprecated. in favor of miku

A simple and easy to use library for fast web prototyping in Haskell.


[Skip to Readme]

Properties

Versions 2009.6.25, 2009.6.26, 2009.6.27, 2009.6.29, 2009.7.2, 2009.8.16, 2009.8.18, 2009.10.13, 2010.10.9, 2011.6.24
Change log changelog.md
Dependencies base (>4 && <=5), data-default, hack (>=2009.5.19), hack-contrib (>=2009.6.25), mps (>=2009.6.25), mtl, utf8-string [details]
License BSD3
Author Wang, Jinjing
Maintainer Wang, Jinjing <nfjinjing@gmail.com>
Stability Unknown
Category Web
Home page http://github.com/nfjinjing/loli
Uploaded Thu Jun 25 17:15:23 UTC 2009 by JinjingWang
Distributions NixOS:2011.6.24
Downloads 1821 total (22 in the last 30 days)
Votes
0 []
Status Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees

Readme for loli

Readme for loli-2009.6.26

Example

import Network.Loli
import Hack.Handler.Happstack


main = run . loli $ do

  -- simple
  get "/hello"    (text "hello world")
  
  -- io
  get "/cabal"    $ text =<< io (readFile "loli.cabal")

  -- route captures
  get "/say/:user/:verb" $ do
    text . show =<< captured

  -- html output
  get "/html"     (html "<html><body><p>loli power!</p></body></html>")

  -- default
  get "/"         (text "at root")

  -- public serve, only allows /src
  public (Just ".") ["/src"]
  
  -- treat .hs extension as text/plain
  mime "hs" "text/plain"