Sha256: 77b26d2537269cfb5693f7aaab589c12d90a71c873c181da058610d634fa4e43
Contents?: true
Size: 602 Bytes
Versions: 1
Compression:
Stored size: 602 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}" Midori::Server.api = api @midori_server = EventMachine.start_server ip, port, Midori::Server end end def self.stop if @midori_server.nil? puts 'Midori Server has NOT been started' return false else EventMachine.stop_server(@midori_server) @midori_server = nil puts 'Goodbye Midori' return true end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
em-midori-0.0.5 | lib/em-midori/em_midori.rb |