diff options
author | Simon Ser <contact@emersion.fr> | 2020-05-13 14:07:44 +0200 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2020-05-13 14:07:44 +0200 |
commit | b891a95fcf4a3d4b64100911dae49fb28904a7fd (patch) | |
tree | fe07b29d6f2443047b7f740c79d86b3c499cc9e9 /docs/example-lua-plugin | |
parent | 4cf5ad68afd80f27512c464843b0d917182ef0c2 (diff) | |
download | alps-b891a95fcf4a3d4b64100911dae49fb28904a7fd.tar.gz alps-b891a95fcf4a3d4b64100911dae49fb28904a7fd.zip |
Rename project to alps
Diffstat (limited to 'docs/example-lua-plugin')
-rw-r--r-- | docs/example-lua-plugin/main.lua | 6 |
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) |