Class: Thin::Server

Inherits:
Object
  • Object
show all
Defined in:
lib/sabbath/server.rb

Instance Method Summary collapse

Instance Method Details

#startObject Also known as: start!

Start the server and listen for connections.

Raises:

  • (ArgumentError)


4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/sabbath/server.rb', line 4

def start
  raise ArgumentError, 'app required' unless @app
  
  log   ">> Sabbath ---> connected to #{app.name} on port #{app.port}, host #{app.host}"
  log   ">> Using Thin web server (v#{VERSION::STRING} codename #{VERSION::CODENAME})"
  debug ">> Debugging ON"
  trace ">> Tracing ON"
  
  log ">> Maximum connections set to #{@backend.maximum_connections}"
  log ">> Listening on #{@backend}, CTRL+C to stop"
  
  @backend.start
end