mirror of
https://github.com/gwenhael-le-moine/credger.git
synced 2024-12-26 09:58:36 +01:00
can launch binary from anywhere
This commit is contained in:
parent
8b40bc6db3
commit
b74c36365c
1 changed files with 5 additions and 1 deletions
|
@ -7,13 +7,17 @@ SEPARATOR = ","
|
|||
|
||||
ENV["PORT"] ||= "3000"
|
||||
|
||||
WD = File.dirname( Process.executable_path.to_s )
|
||||
|
||||
ledger = Ledger.new
|
||||
|
||||
public_folder( "#{WD}/public" )
|
||||
|
||||
# Matches GET "http://host:port/"
|
||||
get "/" do |env|
|
||||
env.response.content_type = "text/html"
|
||||
|
||||
send_file( env, "./public/index.html" )
|
||||
send_file( env, "#{WD}/public/index.html" )
|
||||
end
|
||||
|
||||
get "/api/ledger/version" do |env|
|
||||
|
|
Loading…
Reference in a new issue