diff --git a/src/kotatsu.cr b/src/kotatsu.cr index 260a221..49876c8 100644 --- a/src/kotatsu.cr +++ b/src/kotatsu.cr @@ -1,6 +1,7 @@ # TODO: Write documentation for `Kotatsu` require "option_parser" +require "http/server" module Kotatsu VERSION = "0.1.0" @@ -18,4 +19,14 @@ module Kotatsu exit end end + + webserv = HTTP::Server.new do |context| + context.response.content_type = "text/plain" + context.response.print "Running kotatsu #{VERSION}" + end + + webaddr = webserv.bind_tcp 8080 + puts "Started kotatsu webserver on #{webaddr}" + webserv.listen + end