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
|
# File 'lib/simplepub/cli/server.rb', line 15
def start
Simplepub.config.environment = options.environment
Simplepub.load_config
argv = [
"start",
"-R", options.rackup_file,
"-e", options.rack_environment,
"-p", options.port,
"-a", options.address,
"-l", options.logfile,
"-P", options.pidfile
]
if Simplepub.config.ssl_.certificate?
argv << "--ssl"
argv << "--ssl-cert-file"
argv << Simplepub.config.ssl.certificate
if Simplepub.config.ssl.keyfile?
argv << "--ssl-key-file"
argv << Simplepub.config.ssl.keyfile
end
end
argv << "-d" unless options.no_daemon?
say "Loading server with #{argv.inspect}", :yellow
Thin::Runner.new(argv.flatten).run!
end
|