Skip to content
This repository was archived by the owner on Apr 21, 2019. It is now read-only.

shurikk/sinatra-streaming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sintra-streaming

Overview

sinatra-streaming is an example application using redis pub/sub to demonstrate streaming api endpoints

Example

start redis server

redis-server --daemonize yes

install gems

bundle install

use thin or rainbows

bundle exec thin start -p 9292
# OR rainbows
bundle exec rainbows -p 9292 -c rainbows.conf

in a terminal window

$ curl -i -N http://localhost:9292/subscribe
HTTP/1.1 200 OK
Date: Sat, 26 Apr 2014 04:40:19 GMT
Status: 200 OK
Content-Type: text/event-stream;charset=utf-8
X-Content-Type-Options: nosniff
Connection: close

another window

$ curl -dtext="hello world" http://localhost:9292/
HTTP/1.1 204 No Content
Date: Sat, 26 Apr 2014 04:40:22 GMT
Status: 204 No Content
X-Content-Type-Options: nosniff
Connection: keep-alive

References

About

basic sinatra streaming application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages