diff options
author | Aki <please@ignore.pl> | 2020-08-15 17:21:36 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2020-08-15 17:21:36 +0200 |
commit | 41cb74fa129f5e18b6c0b99b89933869f09b585c (patch) | |
tree | ba478e0c19e9d184fd8cd6e927193c572af3350d /default.lua | |
parent | 53b5ea2bafca4ea7e9bdcbe55f1ed0a458b270e1 (diff) | |
download | plop-41cb74fa129f5e18b6c0b99b89933869f09b585c.zip plop-41cb74fa129f5e18b6c0b99b89933869f09b585c.tar.gz plop-41cb74fa129f5e18b6c0b99b89933869f09b585c.tar.bz2 |
Changed handler loading to be require-like
Diffstat (limited to 'default.lua')
-rw-r--r-- | default.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/default.lua b/default.lua index 914c990..14cdbc9 100644 --- a/default.lua +++ b/default.lua @@ -1,6 +1,7 @@ --- Default client request handler. --- @return string Body of the response -function Handler (method, path, version, headers, data) +local +function handler (method, path, version, headers, data) io.write("(", version, ") [", method, "] ", path, "\n") for header, value in pairs(headers) do io.write(" - ", header, " = '", value, "'\n") @@ -8,3 +9,5 @@ function Handler (method, path, version, headers, data) print(data) return [["Hello, from plop/Lua"]] end + +return handler |