lib/nyoibo/daemon.rb in nyoibo-0.0.3.1 vs lib/nyoibo/daemon.rb in nyoibo-0.0.3.2
- old
+ new
@@ -4,10 +4,10 @@
CMD_QUIT = /^QUIT$/
CMD_JSON = /^JSON: /
TYPE_BASE64 = %r|^data:application/octet-stream;base64,|
def run
return if defined?(IRB)
- return unless defined?(config)
+ return unless Nyoibo.config
daemon = lambda{
EventMachine::WebSocket.start(:host => config.host, :port => config.port) do |ws|
ws.onopen{
ws.send "OK Ready"
}