aboutsummaryrefslogtreecommitdiff
path: root/example/reluax.lua
blob: 0a5f2c7df07165a6257105a4b56797cdc5bbe99e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
local index = require("index")

math.randomseed(os.time())

local function route(path)
    if path == '/' then
        return index()
    elseif path == '/goodbye' then
        return "goodbye"
    elseif path == '/random' then
        return 'no more random'
    end

    return nil
end

return {
    name = "hello-world",
    route = route
}