33 lines
734 B
Lua
33 lines
734 B
Lua
local lapis = require("lapis")
|
|
local config = require("lapis.config").get()
|
|
local json_params = require("lapis.application").json_params
|
|
|
|
local app = lapis.Application()
|
|
app:enable("etlua")
|
|
app.layout = require "views.layout"
|
|
|
|
local autoload = require("lapis.util").autoload
|
|
local handlers = autoload("handlers")
|
|
|
|
local page_titles = {
|
|
name = "DRMR",
|
|
url = "drmr.nl"
|
|
}
|
|
|
|
app:get("/", function(self)
|
|
self.titles = page_titles
|
|
return handlers.Roothandler(self)
|
|
end)
|
|
|
|
app:get("videos", "/videos", function(self)
|
|
self.titles = page_titles
|
|
return handlers.Videohandler(self)
|
|
end)
|
|
|
|
app:get("links", "/links", function(self)
|
|
self.titles = page_titles
|
|
return handlers.Linkhandler(self)
|
|
end)
|
|
|
|
return app
|