Class: Thin::RailsServer
Overview
Serve the Rails application in the current directory.
Instance Attribute Summary
Attributes inherited from Server
#handlers, #host, #port, #timeout
Attributes included from Daemonizable
Attributes included from Logging
Instance Method Summary collapse
-
#initialize(address, port, environment = 'development', cwd = '.') ⇒ RailsServer
constructor
A new instance of RailsServer.
Methods inherited from Server
#listen!, #process, #start, #start!, #stop, #stop!
Methods included from Daemonizable
#change_privilege, #daemonize, included
Constructor Details
#initialize(address, port, environment = 'development', cwd = '.') ⇒ RailsServer
Returns a new instance of RailsServer.
36 37 38 39 40 41 42 |
# File 'lib/thin/rails.rb', line 36 def initialize(address, port, environment='development', cwd='.') super address, port, # Let Rails handle his thing and ignore files Thin::RailsHandler.new(cwd, environment), # Serve static files Thin::DirHandler.new(File.join(cwd, 'public')) end |