-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.ru
53 lines (49 loc) · 1.54 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
require_relative 'rack/common_logger_with_ua'
require_relative 'lib/weather_service'
config = WeatherService.config
app = Rack::Builder.app do
use Rack::CommonLoggerWithUA, WeatherService.logger
run WeatherService.app
end
# AccessLog: [] disable AccessLog WebRick
Rackup::Server.new(app: app,
Host: config.host,
Port: config.port,
server: config.server,
environment: config.environment,
logger: WeatherService.logger,
AccessLog: [],
# manual selection of the server if necessary
# ServerType: WEBrick::SimpleServer,
pid: WeatherService.pidfile,
warmup: true).start
# just type "rackup" in the terminal to run
#
#
#
# you can change the startup parameters using settings.yml
#
# examples:
#
# locations - simply add the desired locations available on the website.
# the link should be to the page with the current weather
# such links have the ending /now/
#
# refresh_rate_minutes - weather update period in minutes
#
# environment:
# production, prod or deploy the log will be written to a file, otherwise STDOUT
# as well as the logger level will be set to INFO, otherwise DEBUG
#
# log_rotation: 'weekly' or 'monthly', this is the standard Logger
#
# pidfile - you can specify the path where the pid should be saved
#
# you can use a proxy to retrieve data from the GisMeteo site:
#
# proxy:
# host: proxy_ip
# port: 3128
# user: weather
# pass: strong_pass
#