i have the following sinatra code, how do i do the equivalent but for a rails app? specifically, want to start rails with thin inside the reactor loop, while also using a websocket server in there too.
require 'bundler'
Bundler.require
class App < Sinatra::Base
get '/' do
slim :index
end
end
EM.run do
EM::WebSocket.start(:host => '0.0.0.0', :port => 3001) do |ws|
# websocket stuff goes here
end
# start sinatra in a thin server instance here (but i want to start a rails app instead)
Thin::Server.start App, '0.0.0.0', 3000
end