-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.ru
24 lines (19 loc) · 1.01 KB
/
config.ru
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require "sinatra"
require "erb"
require "pry"
require "socket"
require "curb"
require "digest/md5"
# Set URLs to other apps
ENV['LOOKINGGLASS_URL'] = "http://localhost:3001" if ENV['LOOKINGGLASS_URL'] == nil
ENV['OCR_IN_PATH'] = "/home/user/ocr_in" if ENV['OCR_IN_PATH'] == nil
ENV['OCR_OUT_PATH'] = "/home/user/ocr_out" if ENV['OCR_OUT_PATH'] == nil
ENV['ARCHIVEADMIN_URL'] = "http://localhost:3002" if ENV['ARCHIVEADMIN_URL'] == nil
ENV['PUBLIC_ARCHIVEADMIN_URL'] = "http://localhost:3002" if ENV['PUBLIC_ARCHIVEADMIN_URL'] == nil
ENV['RAILS_RELATIVE_URL_ROOT'] = "/" if ENV['RAILS_RELATIVE_URL_ROOT'] == nil
# Set project config info
ENV['PROJECT_INDEX'] = "archive_test_hcfgog" if ENV['PROJECT_INDEX'] == nil
ENV['ARCHIVE_SECRET_KEY'] = "UWSzDa2mcuRoFmmu3epvYOhcm8GMyLVDYH0cngi5bV3+90tQWUGZpSc2ghMYoiIpIabYit7zIcwg5UE3e2iU5nmLbB2lJfIP8NhTYmOe6PsbfM8VnDHk0cP1IRLgqYybJndiPw==" if ENV['ARCHIVE_SECRET_KEY'] == nil
# Load all files
Dir.glob('./app/{save,controllers}/*.rb').each { |file| require file }
run UploadController