Any success with Sinatra working together with EventMachine WebSockets?

前端 未结 5 2222
陌清茗
陌清茗 2020-12-07 10:02

I have been using Sinatra for sometime now and I would like to add some realtime features to my web-app by pushing the data via websockets.

I have successfully used

5条回答
  •  粉色の甜心
    2020-12-07 10:47

    FYI, you can also use Padrino apps with EventMachine (as they are subsets of Sinatra apps):

    require 'rubygems'
    require 'eventmachine'
    require 'padrino-core'
    require 'thin'
    require ::File.dirname(__FILE__) + '/config/boot.rb'
    
    EM.run do
      Thin::Server.start Padrino.application, '0.0.0.0', 3000
    end
    

    Cheers, Mike

提交回复
热议问题