-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathserver.rb
More file actions
33 lines (28 loc) · 862 Bytes
/
server.rb
File metadata and controls
33 lines (28 loc) · 862 Bytes
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
#- Ruby source code
#- server.rb ~~
#
# This Ruby app launches a QM API server and a web server for anything placed
# in the "public" folder.
#
# See https://docs.qmachine.org/en/latest/ruby.html for more information.
#
# ~~ (c) SRW, 24 Apr 2013
# ~~ last updated 06 Apr 2018
require 'rubygems'
require 'bundler'
Bundler.require
QM.launch_service({
enable_api_server: true,
enable_cors: false,
enable_web_server: true,
persistent_storage: {
postgres: ENV['DATABASE_URL']
},
port: ENV['PORT'],
public_folder: 'public',
trafficlog_storage: {
postgres: ENV['DATABASE_URL']
},
worker_procs: ENV['WEB_CONCURRENCY'] || 3
})
#- vim:set syntax=ruby: