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

Versions2009.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 logchangelog.md
Dependenciesbase (>4 && <=5), data-default, hack (>=2009.5.19), hack-contrib (>=2009.6.25), mps (>=2009.6.25), mtl, utf8-string [details]
LicenseBSD3
AuthorWang, Jinjing
MaintainerWang, Jinjing <nfjinjing@gmail.com>
CategoryWeb
Home pagehttp://github.com/nfjinjing/loli
UploadedThu Jun 25 17:15:23 UTC 2009 by JinjingWang
DistributionsNixOS:2011.6.24
Downloads1362 total (74 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

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"