Hack #74 Push Notifications to the Browser with Server-Sent Events

  • GitHub
  • A jQuery UI Growl/Ubuntu-like Notification Widget
  • ・ソースコードをダウンロードする方法

    $ git clone https://github.com/lym/sse_tut

    ・動作の確認方法

    $ unzip chapter9jp.zip
    $ cd chapter9jp/hack74
    $ ruby stream.rb 
    == Sinatra/1.3.2 has taken the stage on 4567 for development with backup from Thin
    >> Thin web server (v1.3.1 codename Triple Espresso)
    >> Maximum connections set to 1024
    >> Listening on 0.0.0.0:4567, CTRL+C to stop
    
    ・webブラウザから http://localhost:4567/ と http://localhost:4567/admin  にアクセスする。