Skeleton of basic functionality, all as TODOs

This commit is contained in:
2024-06-28 14:09:58 -03:00
parent 11f1066619
commit 238d045691
9 changed files with 224 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
require "http/request"
require "http/headers"
class Handler
def run(request : HTTP::Request)
{
body: "Hello, Crystal. You said: #{request.body.try(&.gets_to_end)}",
status_code: 200,
headers: HTTP::Headers{"Content-Type" => "text/plain"},
}
end
end

View File

@@ -0,0 +1,2 @@
name: crystal-http-template
version: 0.1.0