Flotype / now

NowJS makes it easy to build real-time web apps using JavaScript
http://www.nowjs.com
MIT License
1.92k stars 175 forks source link

Updates to examples: package.json; CSS; JS. #179

Closed mrienstra closed 12 years ago

mrienstra commented 12 years ago

The express_example example was already working, but I made some "improvements":

  1. Added a package.json, to make it as easy as typing npm install --> node app.js to get the example running.
  2. The styling of elements was a little funky, particularly in Chrome. I cleaned it up a little.
  3. I improved the client-side JS a bit. The text input automatically gets focus at the beginning, & you can use the enter key instead of having to click the button every time.

Hmm, tempting to go back and add a readme.md or some comments to the source...

Update 1: I made some similar changes to helloworld_example (no CSS changes, just package.json & client-side JS).

Update 2: I made some similar changes to multiroomchat_example (no CSS changes, just package.json & client-side JS -- also added a count of the number of others in the room).

Update 3: Made more changes to multiroomchat_example. Now retrieving room count in a better way (using Group count method instead of counting the Group users property). Added notification of leaving and entering -- though this is a bit crude, may be better to leave it out, rather than show it being done somewhat poorly.