mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2024-12-26 09:59:18 +01:00
b18408e033
Signed-off-by: Gwenhael Le Moine <gwenhael.le.moine@gmail.com>
11 lines
286 B
Crystal
11 lines
286 B
Crystal
require "http/server"
|
|
|
|
require "./lib/ledger"
|
|
|
|
server = HTTP::Server.new(8091) do |context|
|
|
context.response.content_type = "text/plain"
|
|
context.response.print Ledger#version # "Hello world, got #{context.request.path}!"
|
|
end
|
|
|
|
puts "Listening on http://127.0.0.1:8091"
|
|
server.listen
|