luddite/app.lua
2025-02-21 22:43:52 -03:00

17 lines
420 B
Lua

local weblit = require('weblit')
weblit.app
.bind({ host = "127.0.0.1", port = 1337 })
-- Configure weblit server
.use(weblit.logger)
.use(weblit.autoHeaders)
.route({ path = "/" }, function(req, res)
res.body = "Wassup! Hello from luvi" .. (_G.is_luvit and "t" or "") .. "!"
res.code = 200
res.headers["Content-Type"] = "text/plain"
end)
-- Start the server
.start()