0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 20:50:24 +00:00

Convert the EventSource example to a release

This commit is contained in:
Loïc Hoguin 2013-09-08 11:48:48 +02:00
parent 6b7b0efd24
commit 49acfce8b9
7 changed files with 31 additions and 41 deletions

View file

@ -1,22 +1,20 @@
Cowboy EventSource
==================
EventSource example
===================
To compile this example you need rebar in your PATH.
To try this example, you need GNU `make`, `git` and
[relx](https://github.com/erlware/relx) in your PATH.
Type the following command:
```
$ rebar get-deps compile
To build the example, run the following command:
``` bash
$ make
```
You can then start the Erlang node with the following command:
```
./start.sh
To start the release in the foreground:
``` bash
$ ./_rel/bin/eventsource_example console
```
Uses Cowboy's loop functionality to continuously send events to the browser.
Example
-------
Point your browser to http://localhost:8080 to see EventSource in action with
any modern browser (not IE).
Then point your EventSource capable browser at
[http://localhost:8080](http://localhost:8080).