initialize

This commit is contained in:
2025-08-09 14:31:59 -06:00
commit 33ccb7e3eb
31 changed files with 2399 additions and 0 deletions

30
test.luau Normal file
View File

@@ -0,0 +1,30 @@
local Net = require("@lune/net")
local Middleware = require("src/Middleware")
local Response = require("src/Server/Response")
local ServerLib = require("src/Server")
local Server = ServerLib.new(3001)
local RootFolder = Server:registerFolder("root", "/")
local wowEndpoint = Server:registerEndpoint(RootFolder, "wow", {
method = "GET",
path = "/wow",
callback = function(request: Net.ServeRequest, response: Response.Response)
response.endpoint.output:raise("funsies", "wow", "info")
response:setBody(string.len(request.body)):setStatus(200):finish()
end
})
print(wowEndpoint)
wowEndpoint.output:onError(function(err)
err:output()
end)
Server:start()
Net.request({url = 'http://localhost:3001/wow'})
Server:disconnect()
local thing