Skip to content

Commit dadbb6b

Browse files
committed
Tidy up README
1 parent 1185b71 commit dadbb6b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ git clone https://github.com/diogob/postgres-websockets.git
2222
cd postgres-websockets
2323
docker-compose up
2424
```
25+
Open your browser on http://localhost:3000 to see an example of usage.
2526

2627
### Pre-compiled binaries
2728

@@ -47,17 +48,13 @@ To run the example below you will need a PostgreSQL server running on port 5432
4748
```bash
4849
source sample-env && ~/.cabal/bin/postgres-websockets
4950
```
50-
After running the above command, open your browser on http://localhost:3000 to see an example of usage.
51+
Open your browser on http://localhost:3000 to see an example of usage.
5152

5253
### Runtime configuration
5354

5455
The sample config file provided in the [sample-env](https://github.com/diogob/postgres-websockets/tree/master/sample-env) file has a jwt secret just for testing and is used in the [sample client]((https://github.com/diogob/postgres-websockets/tree/master/client-example)).
5556

56-
## Opening connections
57-
58-
To open a websocket connection to the server, there are two possible request formats:
59-
60-
1. Requesting a channel and giving a token
57+
## Opening a connection to one channel with a token
6158

6259
When you request access to a channel called `chat` the address of the websockets will look like:
6360
```
@@ -69,7 +66,7 @@ The token on the URL above has no `channels` claim, therefore is can be used to
6966
When the token contains a `channels` claim, the value of that claim should be a list of allowed channels.
7067
Any requested channel not set in that claim will result in an error opening the connection.
7168

72-
2. Giving only the token
69+
## Connecting to multiple channels
7370

7471
When you inform only the token on the websocket address, the `channels` claim must be present.
7572
In this case, all channels present in the claim will be available simultaneously in the same connection.

0 commit comments

Comments
 (0)