-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ru
69 lines (51 loc) · 1.23 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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
require 'rubygems'
require 'bundler'
require 'pry'
Bundler.setup
require './config/config'
require './workers/workers_index' #it requires config/config
use Rack::Deflater
require './handling'
use MyExceptionHandling
use UsersController
use ProfilesController
use ProductionsController
use SpacesController
use FreeBlocksController
use EventsController
use CallsController
use ArtistProposalsController
use SpaceProposalsController
use ActivitiesController
use ProgramsController
use ReactController
use Services::Websocket
use Services::EventSource
MetaRepos.constants.each do |repo_class|
repo = MetaRepos.const_get(repo_class)
Repos.const_set repo_class, repo unless Repos.const_defined? repo_class
controller = MetaController.for(repo)
use controller
end
map '/' do
run WelcomeController
end
map '/login' do
run LoginController
end
map '/search' do
run SearchController
end
map '/forms' do
run FormsController
end
map '/admin' do #FOR META REPOS!!!
run AdminController
end
map '/participant' do
run ParticipantsController
end
$stdout.sync = true #Necessary for logging puts in heroku console
# putting here the Updater, it is executed when loading a page for first time
# require './updater_events'
# EventsUpdater.run