From a84d9eabf1b921086a688f81df28b0f21ba4df19 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Tue, 3 Sep 2019 13:06:00 +0200 Subject: docker installation as gem, links with port numbers, version 1.4.0 --- application.rb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'application.rb') diff --git a/application.rb b/application.rb index fb03a72..e23c042 100644 --- a/application.rb +++ b/application.rb @@ -18,16 +18,22 @@ PUBCHEM_CID_URI = PUBCHEM_URI.split("/")[0..-3].join("/")+"/compound/" "validation.rb" ].each{ |f| require_relative "./lib/#{f}" } -configure :production, :development do +configure :production do STDOUT.sync = true $logger = Logger.new(STDOUT) - #$logger.level = Logger::DEBUG +end + +configure :development do + STDOUT.sync = true + $logger = Logger.new(STDOUT) + $logger.level = Logger::DEBUG end before do # use this hostname method instead to('/') # allowes to set https for xhr requests - $host_with_port = request.host =~ /localhost/ ? request.host_with_port : request.host + #$host_with_port = request.host =~ /localhost/ ? request.host_with_port : request.host + $host_with_port = request.host_with_port $paths = [ "api", "compound", -- cgit v1.2.3