class FReCon::Server
Public: The Sinatra web server.
Public Class Methods
start(*arguments)
click to toggle source
Public: Start the Server
.
Returns the result of starting the server.
# File lib/frecon/server.rb, line 29 def self.start(*arguments) run!(*arguments) end
Protected Class Methods
run!(*arguments)
click to toggle source
Internal: Set up the server and start it.
Calls superclass method
# File lib/frecon/server.rb, line 52 def self.run!(*arguments) setup!(*arguments) super end
setup!()
click to toggle source
Internal: Set up the server.
Sets various Thin and Sinatra options, and sets up the database.
Returns the result of setting up the database.
# File lib/frecon/server.rb, line 40 def self.setup! # Set the Thin and Sinatra options. set :server, %w[thin HTTP webrick] set :bind, FReCon::ENVIRONMENT.server['host'] set :port, FReCon::ENVIRONMENT.server['port'] set :environment, FReCon::ENVIRONMENT.variable.to_s # Set up the database. Database.setup! end