A tool for measuring the coverage of Bluesky/ATProto relays
1require_relative 'server'
2
3# logging normally goes to either stdout or stderr depending on how it's run, if logging is enabled in Sinatra
4# but Passenger routes it all to its main log file unless you use a config option that is premium only :\
5# so we set up logging to a local file explicitly
6
7Dir.mkdir('log') unless Dir.exist?('log')
8$sinatra_log = File.new("log/sinatra.log", "a+")
9
10# flush logs to the file immediately instead of buffering
11$sinatra_log.sync = true
12
13# Sinatra turns off its own logging to stdout if another logger is in the stack
14use Rack::CommonLogger, $sinatra_log
15
16run Sinatra::Application