configurable PORT $(PRT=9292 ./credger)

This commit is contained in:
Gwenhael Le Moine 2017-11-24 15:13:50 +01:00
parent 9135d13f2b
commit 8b40bc6db3
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -5,6 +5,8 @@ require "./ledger"
CURRENCY = ""
SEPARATOR = ","
ENV["PORT"] ||= "3000"
ledger = Ledger.new
# Matches GET "http://host:port/"
@ -53,4 +55,4 @@ get "/api/ledger/register" do |env|
.to_json
end
Kemal.run
Kemal.run( ENV["PORT"].to_i )