Node and SocketIO

508 views

Published on

An intro to Node basics, and using Node with SocketIO to build a simple chatroom. Delivered to KYJSUG on Mar 28 2013 by Ron Northrip.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
508
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Node and SocketIO

  1. 1. Node Demo Night Realtime Chat with Node, SocketIO, AngularFriday, March 29, 13
  2. 2. Part 1: The Server Side • Node Basics • Install, Hello World, Packages, and Such • Socket IO • Lib for Client/Server Data InteractionFriday, March 29, 13
  3. 3. Installing Node • How to install node howtonode.org/how-to-install-nodejs • How I installed node brew install node • requires apple’s command line dev tools • npm package manager comes with itFriday, March 29, 13
  4. 4. Hello World • Hello Console console.log("Hello World"); • Hello World response.write("Hello Worldn"); • Hello Web response.writeHead(200, {"Content-Type": "text/html"});Friday, March 29, 13
  5. 5. Hello SocketIO • Realtime JavaScript Apps • by transferring data in the background • Server Package + Client Lib • broadcast (everyone else) or emit (single) to send data • sits in front of lots of libs/tools • websocket, flash socket, ajax streaming/long polling, iframe, jsonp -- supports back to IE 5.5!Friday, March 29, 13
  6. 6. Try It Yourself rons-macbook.local:8080Friday, March 29, 13

×