Skip to content

Commit

Permalink
Added "How to use" section in README
Browse files Browse the repository at this point in the history
Added "How to use" section in README, with troubelshooting tips.
  • Loading branch information
riverspirit committed Jul 13, 2013
1 parent 6b97403 commit a512410
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Expand Up @@ -22,8 +22,32 @@ NIL
## Dependencies
* [Node.js](http://nodejs.org/) (Server side)
* [websocket module](https://github.com/Worlize/WebSocket-Node) for node (Server side)
* [Apache](http://httpd.apache.org/) web server to serve static contents (Server side)
* A [websocket compliant](http://caniuse.com/websocket) browser (Client side)

## How to use
* Install all the dependencies listed above (NodeJS, Websocket module, Apache server and a compliant browser)
* Clone/copy the Springle-Chat repsitory to a directory inside Apache's web root.
* In `js/chat_client.js`, set `var server_url` to your server URL (probably `localhost`). Leave the ports as is.
* In `js/chat_client.js`, set `var enable_ssl` value to `false`.
* In `js/server.js`, add your server URL (eg: `locahost`, `chat.your-server.com`) to `var allowed_origins` array.
* Open terminal and CD to the directory where Springle-Chat source code is extracted/cloned.
* Start chat server by typing `node js/server.js`
* Doing the above step will start the chat server, which will listen for incoming client connections.
* Browse to the source directory in your browser. (eg: http://localhost/Springle-Chat/) and you will get the chat login page.
* Login to chat giving any nickname and chat room name. Thats all!

### To enable SSL
* Set the path to your SSL cert and key file in array `options.cert` and `options.key` in `js/server.js`
* In `js/chat_client.js`, set `var enable_ssl` value to `true`.
* Start chat server with ssl option as `node js/server.js --enable-ssl`
* Open chat login page in browser also over HTTPS. (eg: https://localhost/Springle-Chat/)
* Thats all!

### Troubleshooting Tips
* Changes you make to the source files will not reflext in the chat front end. To effet the changes, you need to clear the 'HTML5 App Cache' in the browser. (Not normal cache, so `CTRL`+`F5` won't hellp.)
* If chat is not connecting, open `Net` panel in Firebug and check what the error message shown there is.

## Change Log

###v0.4.3
Expand Down

0 comments on commit a512410

Please sign in to comment.