Skip to content

Commit 07dd041

Browse files
authored
Update README.md
1 parent 0604ffc commit 07dd041

File tree

1 file changed

+10
-25
lines changed

1 file changed

+10
-25
lines changed

README.md

Lines changed: 10 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,23 @@
1-
Elli Websocket Handler
2-
======================
1+
# elli_websocket
2+
3+
*A WebSocket handler for [Elli](https://github.com/elli-lib/elli)*
34

4-
elli_websocket is a websocket handler for Elli: https://github.com/knutin/elli
55

66
## Installation
77

8-
You can add elli_websocket to your application by adding it as a dependency to your elli
8+
You can add `elli_websocket` to your application by adding it as a dependency to your elli
99
application.
1010

1111
```erlang
12-
% rebar.config
1312
{deps, [
14-
{elli, ".*", {git, "git://github.com/mmzeeman/elli.git", {branch, "ssl+handover"}}},
15-
{elli_websocket, ".*", {git, "git://github.com/mmzeeman/elli_websocket.git", {branch, "master"}}},
16-
% ...
13+
{elli_websocket, ".*", {git, "git://github.com/elli-lib/elli_websocket.git", {branch, "master"}}}
1714
]}.
1815
```
1916

20-
Afterwards you can run:
21-
22-
```sh
23-
$ ./rebar get-deps
24-
$ ./rebar compile
25-
```
26-
2717

28-
## Callback module
18+
## Callback Module
2919

30-
See elli_example_websocket.erl for details.
20+
See [elli_example_websocket.erl](./src/elli_example_websocket.erl) for details.
3121

3222
```erlang
3323
-module(elli_echo_websocket_handler).
@@ -49,15 +39,14 @@ websocket_info(Req, Message, State) ->
4939

5040
websocket_handle_event(Name, EventArgs, State) ->
5141
ok.
52-
5342
```
5443

55-
## Upgrading to Websocket Connection
5644

57-
This is an example of how you can upgrade to a websocket connection.
45+
## Upgrading to WebSocket Connection
5846

59-
```erlang
47+
This is an example of how you can upgrade to a WebSocket connection.
6048

49+
```erlang
6150
-module(elli_echo_websocket).
6251

6352
-export([init/2, handle/2, handle_event/3]).
@@ -109,7 +98,3 @@ handle('GET', [<<"echo_websocket">>], _Req, _Args) ->
10998
handle(_,_,_,_) ->
11099
ignore.
111100
```
112-
113-
114-
115-

0 commit comments

Comments
 (0)