diff options
author | Christoph Helma <helma@in-silico.de> | 2009-09-08 16:04:23 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2009-09-08 16:04:23 +0200 |
commit | 6a2c3f2100d030c30b7d8ac8c95dcece7edb040c (patch) | |
tree | c2e8069b3787b7ad2b90f062957d23eb12d955dd /lib/templates | |
parent | 4d343f7c584ce09638005665b4ed2de718ff17a6 (diff) |
api separated into individual components, adapted for new webservice versions
Diffstat (limited to 'lib/templates')
-rw-r--r-- | lib/templates/config.ru | 23 | ||||
-rw-r--r-- | lib/templates/config.yaml | 12 |
2 files changed, 30 insertions, 5 deletions
diff --git a/lib/templates/config.ru b/lib/templates/config.ru new file mode 100644 index 0000000..63dd2ce --- /dev/null +++ b/lib/templates/config.ru @@ -0,0 +1,23 @@ +require 'rubygems' +require 'sinatra' +require 'application.rb' +require 'rack' +require 'rack/contrib' + +FileUtils.mkdir_p 'log' unless File.exists?('log') +log = File.new("log/#{ENV["RACK_ENV"]}.log", "a") +$stdout.reopen(log) +$stderr.reopen(log) + +if ENV['RACK_ENV'] == 'production' + use Rack::MailExceptions do |mail| + mail.to 'helma@in-silico.ch' + mail.subject '[ERROR] %s' + end +elsif ENV['RACK_ENV'] == 'development' + use Rack::Reloader + use Rack::ShowExceptions +end + +run Sinatra::Application + diff --git a/lib/templates/config.yaml b/lib/templates/config.yaml index 768fa01..14326fe 100644 --- a/lib/templates/config.yaml +++ b/lib/templates/config.yaml @@ -1,8 +1,10 @@ :base_dir: /home/ch/webservices :webserver: thin :services: - - opentox-feature - - opentox-compound - - opentox-dataset - - opentox-fminer - - opentox-lazar +# make sure to provide a full uri (including training slash) + opentox-feature: "http://localhost:5000/" + opentox-compound: "http://localhost:5001/" + opentox-dataset: "http://localhost:5002/" + opentox-fminer: "http://localhost:5003/" + opentox-similarity: "http://localhost:5004/" + opentox-lazar: "http://localhost:5005/" |