mirror of
https://github.com/gwenhael-le-moine/credger.git
synced 2024-12-25 09:58:43 +01:00
PORT -> CREDGER_PORT
This commit is contained in:
parent
4357ac5002
commit
d3ff3891c8
1 changed files with 4 additions and 4 deletions
|
@ -5,12 +5,10 @@ require "./ledger"
|
|||
ENV["CREDGER_CURRENCY"] ||= "€"
|
||||
ENV["CREDGER_SEPARATOR"] ||= ","
|
||||
|
||||
ENV["PORT"] ||= "3000"
|
||||
ENV["CREDGER_PORT"] ||= "3000"
|
||||
|
||||
WD = File.dirname( Process.executable_path.to_s )
|
||||
|
||||
ledger = Ledger.new
|
||||
|
||||
public_folder( "#{WD}/public" )
|
||||
|
||||
# Matches GET "http://host:port/"
|
||||
|
@ -20,6 +18,8 @@ get "/" do |env|
|
|||
send_file( env, "#{WD}/public/index.html" )
|
||||
end
|
||||
|
||||
ledger = Ledger.new
|
||||
|
||||
get "/api/ledger/version" do |env|
|
||||
env.response.content_type = "text"
|
||||
|
||||
|
@ -59,4 +59,4 @@ get "/api/ledger/register" do |env|
|
|||
.to_json
|
||||
end
|
||||
|
||||
Kemal.run( ENV["PORT"].to_i )
|
||||
Kemal.run( ENV["CREDGER_PORT"].to_i )
|
||||
|
|
Loading…
Reference in a new issue