Skip to content


Subversion checkout URL

You can clone with
Download ZIP
a socketio hack with backbonejs-todos-example, with nodejs backend
JavaScript PHP
Fetching latest commit...
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

a chatroom

demo user:alvin|password:pass

a quick hack to try out chat on nodejs, socketio, mongodb, backbonejs mvc with its todo list example.

inspired by

current features

  • todo list with local storage (originally implemented by Jérôme Gravel-Niquet
  • user verification to enter a chat/broadcast message
  • check in current location with web browser
  • chatroom features with command: key in /help(command for help), /ding(play a ding sound), /whoishere(check login users), /get10(get last 10 messages), /crashnode(force restart server, for development)
  • unfiltered message input, (e.g. place a youtube to play music during chat), place image, audio, video tag in chatroom, or place a chatroom within a chatroom, etc<br></li> </ul> <h4>chatroom bot</h4> <ul> <li>send http request - e.g.: &quot;@lahbot request <a href=""></a>&quot; (action:send request and get response)<br></li> <li>remember command - e.g: &quot;@lahbot $remember [$helloworld] [Hello world!]&quot; (usage:@lahbot $helloworld)(action:send a message &quot;Hello world!&quot;)<br></li> </ul> <h4>server requirement</h4> <ul> <li>nodejs server<br> : server setup: <a href=""></a> or <a href="">manual setup</a><br> : nodejs packages via npm: <a href="">expressjs</a>, <a href=""></a>, <a href="">googlemaps</a>, <a href="">mongoosejs</a><br></li> <li><a href="">mongodb</a><br></li> <li>(optional) php server, to display user location in map<br></li> </ul> <h4>setting up</h4> <ul> <li>install the nodejs packages as stated in the requirement above<br></li> <li>copy and rename config.js.sample to config.js, enter the listening port used for server and chat app<br></li> <li>copy and rename public/chat/js/config.js.sample to public/chat/js/config.js, enter your server host and port as above<br></li> <li>(optional)copy public/chat/map.php to a php server if you want show location on map<br></li> <li>install mongodb, then insert at least a username, password in users collections<br></li> <li>run node!<br></li> <li>browse to <a href=""></a>, type a random message, you should see &quot;Please login to chat&quot;</li> </ul> <h4>troubleshooting</h4> <ul> <li>make sure all the required nodejs packages are installed<br></li> <li>make sure mongodb is installed and connected<br></li> <li>make sure the html page is connected to the nodejs server, you will see &quot;client <random number> connected&quot;, when you type message in the chat box, you will see &quot;Please login to chat&quot;<br></li> </ul> <h4>links</h4> <p>check out <a href="">@honcheng</a> to get the iphone/ipad client </p>
Something went wrong with that request. Please try again.