function decide(request)
return iocaine.decision.Passthrough("foo")
end
❯ cargo run -- runtime decide
Anarchism("foo")
Awoo!
function decide(request)
return iocaine.decision.Passthrough("foo")
end
❯ cargo run -- runtime decide
Anarchism("foo")
Awoo!
Meanwhile, thinking about how to name the configuration module, I though of pillowtalk.
Hah, the first bullshit generator binding was a bit of a pain, the second one was a breeze.
Marvel at this beautiful thing!
function output(request, decision)
local rng = iocaine.generators.rng:from_seed(request.path);
local fjdata = iocaine.file.read("tmp/fakejpeg.msgpack");
local fj = iocaine.generators.FakeJpeg(fjdata);
local body = fj:generate(rng)
local response = iocaine.http.Response(body);
response:set_header("content-type", "image/jpeg")
return response
end
Mppfngh. Bindings are boring, but I'm like... halfway through!