sokol-luajit/editor/routes/index.lua

19 lines
383 B
Lua
Raw Normal View History

2024-12-12 20:56:46 +08:00
local utils = require("utils")
local route = {
http_server = nil,
ecs_server = nil,
}
local index_root = {
pattern = "/index%.html[.+]?$",
func = function(matches, stream, headers, body)
2024-12-13 14:16:07 +08:00
local index = utils.loaddata(base_www_path.."index.html")
2024-12-12 20:56:46 +08:00
return route.http_server.html(index)
end,
}
route.routes = {
index_root,
}
return route