#ITP CAMP NODEJS --> ARDUINO SESSION ##June 13th, 2011 w/ John Schimmel
The following NodeJS script go over the basics of server functionality with JavaScript.
##For this to work, first install NodeJS Visit http://www.nodejs.org for more information
##Simple Chat - tcp-chat-server.js This script creates a TCP server on port 1337 that can be accessed via Telnet To start the server, open a command prompt/terminal window and run the following:
node /<path-to-files>/tcp-chat-server.js
To connect to the server, open another terminal window:
telnet localhost 1337
##Simple web server - webserver.js Start a simple web server with NodeJS running on port 8080. Run the following command in a terminal window.
node /<path-to-files>/webserver.js
To view the web page, in a web browser navigate to
http://localhost:8080