Class: Lattice::Server
- Inherits:
-
Object
- Object
- Lattice::Server
- Defined in:
- lib/lattice/server.rb
Instance Method Summary collapse
-
#initialize(host, port, options = {}) ⇒ Server
constructor
A new instance of Server.
- #load ⇒ Object
- #run ⇒ Object
Constructor Details
Instance Method Details
#load ⇒ Object
13 14 15 16 |
# File 'lib/lattice/server.rb', line 13 def load $LOAD_PATH << @root require 'config/application' end |
#run ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/lattice/server.rb', line 18 def run app = Lattice.app app.configure do |config| config.ip = @host config.port = @port config.adapter = :Reel end Lattice.logger.info "A Reel good HTTP server! (Codename \"#{::Reel::CODENAME}\")" Lattice.logger.info "Listening on http://#{@host}:#{@port}" app.run end |