NOTE: This is still not ready. Many, if not most, would consider it a toy. Purely for esoteric reasons.
Mid_Jam generates functions that you could use in a (Rack_Jam)[https://github.com/jam-lua/rack_jam].
local Mid_Jam = require("mid_jam")
local mj = Mid_Jam.new()
Rack_Jam.new().BEFORE(
mj:GET("/my/:name/:obj")
:param("name", "length at least", 1)
:param("name", "length at most", 20)
:param("obj", "within", {'pet', 'candy', 'snowball'})
:run(function (req, resp, env)
-- do something magical
end)
)
- HEAD
- GET
- POST
- PUT
- DELETE
local Mid_Jam = require("mid_jam")
local mj = Mid_Jam.new()
mj:New_Method('PATCH')
mj:PATCH("/puppy", function (req, resp, env)
-- do something to your puppy
end)
Haha.... good luck with that!
Later.