aboutsummaryrefslogtreecommitdiff
path: root/docs/example-lua-plugin/main.lua
diff options
context:
space:
mode:
Diffstat (limited to 'docs/example-lua-plugin/main.lua')
-rw-r--r--docs/example-lua-plugin/main.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/example-lua-plugin/main.lua b/docs/example-lua-plugin/main.lua
index 8df1ec6..eafd9dd 100644
--- a/docs/example-lua-plugin/main.lua
+++ b/docs/example-lua-plugin/main.lua
@@ -2,18 +2,18 @@
print("Hi, this is an example Lua plugin")
-- Setup a function called when the mailbox view is rendered
-koushin.on_render("mailbox.html", function(data)
+alps.on_render("mailbox.html", function(data)
print("The mailbox view for " .. data.Mailbox.Name .. " is being rendered")
-- Set extra data that can be accessed from the mailbox.html template
data.Extra.Example = "Hi from Lua"
end)
-- Wire up a new route
-koushin.set_route("GET", "/example", function(ctx)
+alps.set_route("GET", "/example", function(ctx)
ctx:String(200, "This is an example page.")
end)
-- Set a filter function that can be used from templates
-koushin.set_filter("example_and", function(a, b)
+alps.set_filter("example_and", function(a, b)
return a .. " and " .. b
end)