Skip to content

Commit

Permalink
Merge pull request #108 from MegaGM/patch-1337
Browse files Browse the repository at this point in the history
update readmeh
  • Loading branch information
jondubois authored Mar 16, 2018
2 parents 03f7fda + 88923a2 commit 1825673
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ To install, run:
npm install socketcluster-client
```

The socketcluster-client script is called socketcluster.js (located in the main socketcluster-client directory)
- You should include it in your HTML page using a <script> tag in order to interact with SocketCluster.

## How to use

Embed in your HTML page using (Note that the src attribute may be different depending on how you setup your HTTP server):
The socketcluster-client script is called `socketcluster.js` (located in the main socketcluster-client directory).
Embed it in your HTML page like that:

```html
<script type="text/javascript" src="/socketcluster.js"></script>
```
- Note that the src attribute may be different depending on how you setup your HTTP server

Once you have embedded the client socketcluster.js into your page, you will gain access to a global socketCluster object.
Then, to begin interacting with the SocketCluster cluster, you will need to establish a connection.
Expand Down Expand Up @@ -121,8 +121,6 @@ socket.on('subscribeStateChange', function(data) {
socket.on('message', function(data) {
console.log('message:' + data);
});

//... bla.. blaahh.. blaaahh
```

## Developing
Expand Down

0 comments on commit 1825673

Please sign in to comment.