Skip to content

Commit

Permalink
meh, cache and stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Apr 12, 2012
1 parent 0f9bba7 commit a24f627
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions web/hangover.lua
@@ -1,9 +1,11 @@
local orbit = require "orbit"
require "orbit.cache"

module("hangover", package.seeall, orbit.new)
require "lib/model"
local cache = orbit.cache.new(hangover, cache_path)
tracks = require "lib/model"

function render(t, content)
function render( t, content)
return html {
head { title("Hangover - " .. t),
meta{ ["http-equiv"] = "Content-Type",
Expand All @@ -20,8 +22,8 @@ function render(t, content)
end


function index()
return render("hello","world")
function index(web)
return render("hello",tracks:dump())
end

function render_add_track()
Expand Down Expand Up @@ -75,6 +77,7 @@ hangover:dispatch_get(render_add_track2, "/wtf")
hangover:dispatch_get(view_web, "/stfu")
hangover:dispatch_get(view_webi, "/stfui")
hangover:dispatch_get(view_links, "/lonks")
hangover:dispatch_get(cache(index), "/post/(%d+)")

hangover:dispatch_static("/p/.+")

Expand Down

0 comments on commit a24f627

Please sign in to comment.