Sha256: 784846550eefbcde128d5438b04c716d815335728f266683df6af746e9c6cbd3
Contents?: true
Size: 588 Bytes
Versions: 1
Compression:
Stored size: 588 Bytes
Contents
require 'eventmachine' module Midori def self.run(api=Midori::API, ip=nil, port=nil) ip ||= '127.0.0.1' port ||= 8081 EventMachine.run do puts "Midori #{Midori::VERSION} is now running on #{ip}:#{port}".blue @midori_server = EventMachine.start_server ip, port, Midori::Server, api end end def self.stop if @midori_server.nil? puts 'Midori Server has NOT been started'.red return false else EventMachine.stop_server(@midori_server) @midori_server = nil puts 'Goodbye Midori'.blue return true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
em-midori-0.0.6 | lib/em-midori/em_midori.rb |