No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.env.example
.gitignore
.ruby-version
Gemfile
Gemfile.lock
Procfile
README.md
app.rb
config.ru

README.md

Sinatra Realtime Server

An example server that responds to POST /messages requests and triggers Pusher events. Built to accompany the EmberJS Realtime Chat frontend.

Running the server

First, install all dependencies:

bundle install

Then create a .env file with your pusher credentials (see .env.example for keys).

Then run the app:

bundle exec ruby app.rb

And you can then POST to http://localhost:4567/messages.

curl http://localhost:4567/messages --data 'time=0&username=foo&text=bar'