This project is read-only.

Setup for Test Project
Node.js and Socket.IO must be available locally, or you need to have an external instance of node to work with. I’ll assume for the moment you’ll want to work locally, so here are the simple steps:

  1. Download and install nodejs from here: http://nodejs.org/#download
    All of my testing as been with latest versions – currently at v0.6.10
  2. Run the “install_node_modules.bat” batch file from the ..\TestProject\Node folder
    This will install 3 of the required modules for my tests in the sub-folder ..\TestProject\Node\node_modules :
    1. optimist - Light-weight option parsing for node
    2. express - High performance, high class web development for node
    3. socket.io – Realtime websocket server for node
  3. A local version of node.js and associated modules are now ready to go.

..\TestProject\node\startEvents.bat can be used to start the node.js instance, and launch chrome browser to a default web page. Changes any of the following items as you might require.

@echo off
set host=localhost
set port=3000
@echo on
start "node cmd" /B node appEvents.js --host %host% --port %port%
start "chrome" chrome.exe http://%host%:%port%/
pause

Running the batch file should result in a console window for node.js opening like:

image_thumb8

The batch file will also open a chrome browser page with a sample web page:

image_thumb5

Notes

I have not include the node_modules directory that contains modules. npm (node package manager) makes getting &installing any  modules extremely easy, and hopefully eliminate any versioning and documentation issues - not to mention any licensing issues that might get (ahem) stepped on.

Last edited Feb 7, 2012 at 5:14 AM by jstott, version 7

Comments

No comments yet.