-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdev.rb
More file actions
executable file
·30 lines (26 loc) · 744 Bytes
/
dev.rb
File metadata and controls
executable file
·30 lines (26 loc) · 744 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
#!/usr/bin/env ruby
require 'bundler/setup'
require 'webrick'
require 'webrick/ssl'
require 'logger'
require 'rack'
ENV['RACK_ENV'] = 'development'
ENV['CLARION_DEV_HTTPS']='1'
ENV['CLARION_REGISTRATION_ALLOWED_URL']='.+'
ENV['CLARION_STORE']='memory'
ENV['CLARION_COUNTER']='memory'
app, _ = Rack::Builder.parse_file(File.join(__dir__, 'config.ru'))
rack_options = {
app: app,
Port: ENV.fetch('PORT', 3000).to_i,
Host: ENV.fetch('BIND', '127.0.0.1'),
environment: 'development',
server: 'webrick',
Logger: Logger.new($stdout),#.tap { |_| _.level = Logger::DEBUG },
SSLEnable: true,
SSLCertName: 'CN=localhost',
SSLCertComment: 'dummy',
SSLStartImmediately: true,
}
server = Rack::Server.new(rack_options)
server.start