Peradventure/app.lua
2024-03-17 21:20:39 -05:00

68 lines
626 B
Lua

local lapis = require("lapis")
local app = lapis.Application()
local say = require('lua_scripts/main')
local mapFunc = require('lua_scripts/map')
local player = require('player')
local db = require("lapis.db")
local Model = require("lapis.db.model").Model
local map = Model:extend('map')
app:enable("etlua")
app.layout = require "views.layout"
app:post("/clickme", function(self)
self.plane = "P-38L"
mapFunc.populate(self, map)
return {self.plane, layout = false}
end)
app:get("/", function(self)
self.text = say.hello()
return {render = "index",
}
end)
return app