sokol-luajit/editor/routes/index.lua
2024-12-12 23:26:46 +10:30

19 lines
385 B
Lua

local utils = require("utils")
local route = {
http_server = nil,
ecs_server = nil,
}
local index_root = {
pattern = "/index%.html[.+]?$",
func = function(matches, stream, headers, body)
local index = utils.loaddata(base_www_path.."index.html")
return route.http_server.html(index)
end,
}
route.routes = {
index_root,
}
return route