mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2024-12-27 21:58:11 +01:00
12 lines
286 B
Crystal
12 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
|