This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
loli / release.md
ANN: loli: a minimal web dev DSL
loli is a DSL built on hack. It allows you to easily define routes, build your custom template backends through a simple Template interface, and integrate with other hack middleware.
driver
The simplest app looks like this
import Network.Loli import Hack.Handler.Happstack main = run . loli - get "/" (text "loli power")route
will route "/hello" to a controller that outputs hello.get "/hello" - do text "hello"middleware
using a middleware is just as declaring
middleware lambdatemplate
the template interface is
class Template a where interpolate :: a -> String -> Context -> IO StringContext is just [(String, String)]
After implementing your own template engine, you can use
output - your-engine-constructor "template-name"demo
I put the source of a dummy paste app on itself:
loli is on hackage, lolipaste is in loli repo on github:
happy hacking







