Mercurial > hg > nodescore
changeset 72:9af4250ff7d5
added file to test why static webserver doesnt work on home machine - using connect now instead of node-static this will be pushed into the main nodescore.js once its cleaned up
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/basictest.js Sun Oct 27 01:49:58 2013 +0100 @@ -0,0 +1,323 @@ +/* +//////////////////////////////////////////// + +nodescore server +nodescore.kiben.net +nodescore@kiben.net + +//////////////////////////////////////////// +*/ + +var sio = require('socket.io') +, http = require('http') +, ch = require('./chronometer') +, url = require('url') +, path = require('path') +, fs = require('fs') +, connect = require('connect') +, static = require('node-static'); + +var mimeTypes = { + "html": "text/html", + "jpeg": "image/jpeg", + "jpg": "image/jpeg", + "png": "image/png", + "js": "text/javascript", + "css": "text/css"}; + +var requirejs = require('requirejs'); + +requirejs.config({ + //Pass the top-level main.js/index.js require + //function to requirejs so that node modules + //are loaded relative to the top-level JS file. + nodeRequire: require, + findNestedDependencies: true +}); + +var pinging=0 +console.log("ping set to 0") + +// run webserver serving static html +//////////////////////////////////////////// +var httpServer = connect() + .use(connect.logger('dev')) + .use(connect.static('www')) + .use(function(req, res){ + res.end('404\n'); + }) + .listen(8890); + +//////////////////////////////////////////// +// connect to websockets +//////////////////////////////////////////// + + +io = sio.listen(httpServer) +, nicknames = {}; + +//var sequencer = require('./sequencer') + +io.set('log level', 4); // reduce logging +io.sockets.on('connection', function (socket) { + + socket.on('nickname', function (nick, fn) { + if (nicknames[nick]) { + fn(true); + } else { + fn(false); + nicknames[nick] = socket.nickname = nick; + socket.broadcast.emit('announcement', nick + ' connected'); + io.sockets.emit('nicknames', nicknames); + } + }); + + /// chat user messages to screens and to log file + // date format for filename + var da = new Date(); var dtstring = da.getFullYear()+ '-' + da.getMonth()+ '-' + da.getDate(); + //////////////////////// + /// log messages to file + socket.on('user message', function (msg) { + fs.open('logs/chatlog-'+dtstring+'.txt', 'a', 666, function( e, id ) { + //time format for message stamp + var dt = new Date();var timestring = dt.getHours() + ':' + dt.getMinutes() + ':' + dt.getSeconds(); + socket.broadcast.emit('user message', socket.nickname, msg); + var fs = require('fs'), str = msg; + fs.write( id, timestring+" " + socket.nickname + ": "+ msg+"\n", null, 'utf8', function(){}); + }); + }); + + //////////////////////////////////////////// + // chronometer + sequencer controls (all this should be modularised) + //////////////////////////////////////////// + + socket.on('stopWatch', function (state) { stopWatch(state);}); + socket.on('stopChr', function () { stopChr(); }); + socket.on('resetChr', function () { resetChr();}); + socket.on('startSeq', function () { startChr(); }); + var chronstate=0; + + // send the date/time every second + + xdatetime = setInterval(function () { + d = ch.xdateTime() + socket.broadcast.emit('dateTime', d) + socket.emit('dateTime', d) + }, 1000) + + ////////////////////////////// + // /* this should be moved to its own file chronometer.js + + function chronCtrl (state,interval){ + if (state==1){ console.log("chronControl....onestate") + var date = new Date(); var starttime = new Date().getTime() / 1000; + xstopwatch = setInterval(function () { + var nowtime = new Date().getTime() / 1000; + now = nowtime-starttime + hours = parseInt( now / 3600 ) % 24; + minutes = parseInt( now / 60 ) % 60; + seconds = parseInt(now % 60); + milliseconds = Math.floor((now-seconds)*10)%60; + time = + (hours < 10 ? "0" + hours : hours) + ":" + + (minutes < 10 ? "0" + minutes : minutes) + ":" + + (seconds < 10 ? "0" + seconds : seconds) + "."+ + milliseconds; + socket.broadcast.emit('chronFromServer', time) + socket.emit('chronFromServer', time) + }, 100) + } + + if (state==0) { console.log("chronControl....zerostate") ; clearInterval(xstopwatch); } + + } + + + // if not already started start the chronometer and sequencer + function startChr(socket) { chronCtrl(1,100); step(seqA);step(seqB); step(seqC); step(seqD); } + // stop the chronometer + function stopChr() { console.log("stop chron"); chronCtrl(0); } + + function pad(number) { return (number < 10 ? '0' : '') + number } + function resetChr() {//clearInterval(); + zecsec = 0; seconds = 0; mins = 0; hours = 0; + var chron = pad(hours) +":"+pad(mins)+ ':'+ pad(seconds)+ ":"+ zecsec + // send 0.00.00 values to display + socket.broadcast.emit('chronFromServer', chron) + socket.emit('chronFromServer', chron) + } + + //////////////////////////////////////////// + // magic square sequencer (this should be modularised) + //////////////////////////////////////////// + // all the variables this sequencer needs are in scoreB.js + requirejs(['scoreB'],function(scoreB) {}); + + var sequencerState=0; + var numberoftransects=3 + var order=8 + var countdowntick=function(seq){ + var unit=seq.units[seq.transect%numberoftransects][seq.counter]; + var unitlast=seq.units[seq.transect%numberoftransects][seq.counter-1]; + var voice=seq.voice; + var tempoms = Math.floor(60000/seq.mm) + var timemultiplier=1000 + var outcount=4; var incount=4; + var dur=srcsqr[Math.floor(unit/order)][unit%order] + 4 + var time = dur; + var ztime=time; + var totaltime=time + initPage=function(seq){ + // initiate first page here + socket.emit("pageIni", voice, unit, time, seq.mm,seq.counter,seq.nextunit ); + socket.emit("pageFlipfromserver", voice, unit, time, seq.mm,seq.counter,seq.nextunit ); + } + + function sequenCer() { + if (ztime >= 0 ){ + var counter = ztime + // flip the page + if (counter == 0){ + //increment the row position + seq.counter = (seq.counter + 1) % (order) + //increment the transect + if ( seq.counter==0 ){ seq.transect += 1 } + socket.broadcast.emit("pageFlipfromserver", voice, unit, time, seq.mm,seq.counter,seq.nextunit); + clearInterval(pulse) + step(seq); + } + + if (counter >= 0 ){ + socket.broadcast.emit('counterText', + voice, unit, counter,seq.counter,unitlast,seq.transect%numberoftransects); + socket.emit('counterText', + voice, unit, counter,seq.counter,unitlast,seq.transect%numberoftransects); + + if (counter <= outcount ) { + socket.broadcast.emit('countinFromServer', + voice, counter, + "","stop in: ", "red", "transparent",unit); + socket.emit('countinFromServer', + voice, counter, + "","stop in: ", "red", "transparent",unit); + } + + if (counter > (totaltime)-incount && counter <= totaltime ) { + socket.broadcast.emit('countinFromServer', + voice, counter-(totaltime-incount), + "","play in: ", "green","transparent",unit); + socket.emit('countinFromServer', + voice,counter-(totaltime-incount), + "","play in: ", "green","transparent",unit); + } + + if (counter == (totaltime)-incount ) { + socket.broadcast.emit('countinFromServer', + voice, "+", + "","playing.. ", "green","transparent",unit); + socket.emit('countinFromServer', + voice, "+", + "","playing.. ", "green","transparent",unit); + } + } + + // on each beat do: + // push out the pulse to metronome + seq.metrobeat = (seq.metrobeat+1)%seq.beatsinbar ; + socket.broadcast.emit('metroPulse', tempoms, voice,seq.metrobeat); + socket.emit('metroPulse', tempoms, voice, seq.metrobeat); + } + + // decrement the time + ztime -= 1 + +// this shows undefined counter output - bug related +// console.log(counter) + } + + var pulse = setInterval(sequenCer, tempoms); + + socket.on('stopSeq', function () { + sequenCer.clearInterval + console.log("sequencer stopping...") + // grrr why wont this clearInterval work + sequencerState = 0 + clearInterval(pulse) + sequenCer.clearInterval(pulse) + stopChr(); + }); + }; + + step = function (seq) { + clearInterval(countdowntick); + countdowntick(seq) + sequencerState=1; + initPage(seq) + }; + + socket.on('resetSeq', function () { resetChr(); }); + + //////////////////////////////////////////// + // some latency calculations + /////////////////////////////////////////// + + /* + a ping is periodically broadcast to all connected clients each + connected returns a pong to the server via an "emit" and in turn + the server returns each unique client a report of the latency + via another emit - the emit only sends to the source of the + request, whereas the broadcast.emit.. broadcasts.. ie to all + connected clients + + TODO: smooth range and average out results to remove erratic ping + times. + + TODO: + The result then needs to be used to stagger outgoing messages to + compensate for latency - how much compensation is more connected + to the time that any audio/video feed needs to encode/decode as + the latency of the route from node A to node B is inavoidable?! + so maybe latency is irrelevant in this context - we just need to + stagger signals according to encoding decoding times.. hmmm + */ + + +// periodically broadcast a ping + function serverTime(freq) { + if (pinging==0){ st = setInterval(function() { + var pinging=1; + var d = new Date(); var n = d.getTime(); + socket.emit("timeFromServer", n); + }, 1000); } else console.log("already pinging") + } + // receive the pong calculate the latency and + // return the response to the client + + socket.on("clientTimeResponse", function(x) { + var d = new Date(); var n = d.getTime(); + var latency = (n-x)/2; + //console.log("SERVERTIME:"+x + " LATENCY:" + latency); + socket.emit("latencyFromServer", latency); + }); + + + + serverTime(1000); + + socket.on('disconnect', function(client) { + console.log(socket.nickname + " is gone..." ) + clearInterval(st); + + if (!socket.nickname) return; + + delete nicknames[socket.nickname]; + socket.broadcast.emit('announcement', socket.nickname + ' disconnected'); + socket.broadcast.emit('nicknames', nicknames); + }); + +}); + +exports.socket= io.sockets; +exports.httpServer = httpServer; + +
--- a/node_modules/node-static/node_modules/colors/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/node-static/node_modules/colors/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -25,9 +25,5 @@ "readme": "# colors.js - get color and style in your node.js console ( and browser ) like what\n\n<img src=\"http://i.imgur.com/goJdO.png\" border = \"0\"/>\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n- rainbow\n- zebra\n- random\n\n## Usage\n\n``` js\nvar colors = require('./colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n```\n\n# Creating Custom themes\n\n```js\n\nvar colors = require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n\n### Contributors \n\nMarak (Marak Squires)\nAlexis Sellier (cloudhead)\nmmalecki (Maciej MaĆecki)\nnicoreed (Nico Reed)\nmorganrallen (Morgan Allen)\nJustinCampbell (Justin Campbell)\nded (Dustin Diaz)\n\n\n#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)\n", "readmeFilename": "ReadMe.md", "_id": "colors@0.6.2", - "dist": { - "shasum": "feb92acb58bc6d82083ec15e6c8718877e2dd746" - }, - "_from": "colors@>=0.6.0", - "_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.2.tgz" + "_from": "colors@>=0.6.0" }
--- a/node_modules/node-static/node_modules/mime/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/node-static/node_modules/mime/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -31,9 +31,5 @@ "url": "https://github.com/broofa/node-mime/issues" }, "_id": "mime@1.2.11", - "dist": { - "shasum": "2e68433cd8b933cc360926e916e08e705e3bf1ae" - }, - "_from": "mime@>=1.2.9", - "_resolved": "https://registry.npmjs.org/mime/-/mime-1.2.11.tgz" + "_from": "mime@>=1.2.9" }
--- a/node_modules/node-static/node_modules/optimist/node_modules/minimist/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/node-static/node_modules/optimist/node_modules/minimist/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -46,9 +46,5 @@ "url": "https://github.com/substack/minimist/issues" }, "_id": "minimist@0.0.5", - "dist": { - "shasum": "d7aa327bcecf518f9106ac6b8f003fa3bcea8566" - }, - "_from": "minimist@~0.0.1", - "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz" + "_from": "minimist@~0.0.1" }
--- a/node_modules/node-static/node_modules/optimist/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/node-static/node_modules/optimist/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -42,9 +42,5 @@ "url": "https://github.com/substack/node-optimist/issues" }, "_id": "optimist@0.6.0", - "dist": { - "shasum": "69424826f3405f79f142e6fc3d9ae58d4dbb9200" - }, - "_from": "optimist@>=0.3.4", - "_resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.0.tgz" + "_from": "optimist@>=0.3.4" }
--- a/node_modules/node-static/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/node-static/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -49,9 +49,5 @@ "url": "https://github.com/cloudhead/node-static/issues" }, "_id": "node-static@0.7.2", - "dist": { - "shasum": "77d9ae0d348b6e14ea7bc30f309d47b34b8c692e" - }, - "_from": "node-static@", - "_resolved": "https://registry.npmjs.org/node-static/-/node-static-0.7.2.tgz" + "_from": "node-static@" }
--- a/node_modules/requirejs/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/requirejs/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -35,9 +35,5 @@ "url": "https://github.com/jrburke/r.js/issues" }, "_id": "requirejs@2.1.9", - "dist": { - "shasum": "15cfb5b266ec984047cf353ffb95d053173d1494" - }, - "_from": "requirejs@", - "_resolved": "https://registry.npmjs.org/requirejs/-/requirejs-2.1.9.tgz" + "_from": "requirejs@" }
--- a/node_modules/socket.io/node_modules/base64id/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/base64id/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -20,9 +20,5 @@ "url": "https://github.com/faeldt/base64id/issues" }, "_id": "base64id@0.1.0", - "dist": { - "shasum": "27063de8377a138dbb27c62935fc15c7e7bf8ae3" - }, - "_from": "base64id@0.1.0", - "_resolved": "https://registry.npmjs.org/base64id/-/base64id-0.1.0.tgz" + "_from": "base64id@0.1.0" }
--- a/node_modules/socket.io/node_modules/policyfile/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/policyfile/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -47,9 +47,5 @@ "url": "https://github.com/3rd-Eden/FlashPolicyFileServer/issues" }, "_id": "policyfile@0.0.4", - "dist": { - "shasum": "48035eed47693ffd628a809591f062233439aa7e" - }, - "_from": "policyfile@0.0.4", - "_resolved": "https://registry.npmjs.org/policyfile/-/policyfile-0.0.4.tgz" + "_from": "policyfile@0.0.4" }
--- a/node_modules/socket.io/node_modules/redis/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/redis/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -30,9 +30,5 @@ "url": "https://github.com/mranney/node_redis/issues" }, "_id": "redis@0.7.3", - "dist": { - "shasum": "00da64f7a42de77cca52e7e41772766a45523b9e" - }, - "_from": "redis@0.7.3", - "_resolved": "https://registry.npmjs.org/redis/-/redis-0.7.3.tgz" + "_from": "redis@0.7.3" }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -23,9 +23,5 @@ "url": "https://github.com/qfox/ZeParser/issues" }, "_id": "zeparser@0.0.5", - "dist": { - "shasum": "32475f375ec6faa7192d86971dac037bdf4a1939" - }, - "_from": "zeparser@0.0.5", - "_resolved": "https://registry.npmjs.org/zeparser/-/zeparser-0.0.5.tgz" + "_from": "zeparser@0.0.5" }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -30,9 +30,5 @@ "url": "https://github.com/felixge/node-active-x-obfuscator/issues" }, "_id": "active-x-obfuscator@0.0.1", - "dist": { - "shasum": "2021e3f99352219764b2baa61dee054826272559" - }, - "_from": "active-x-obfuscator@0.0.1", - "_resolved": "https://registry.npmjs.org/active-x-obfuscator/-/active-x-obfuscator-0.0.1.tgz" + "_from": "active-x-obfuscator@0.0.1" }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -21,9 +21,5 @@ "url": "https://github.com/mishoo/UglifyJS/issues" }, "_id": "uglify-js@1.2.5", - "dist": { - "shasum": "47f5ac8c5b19eb6eabd9b9fa6a09a602f7c6a3b5" - }, - "_from": "uglify-js@1.2.5", - "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-1.2.5.tgz" + "_from": "uglify-js@1.2.5" }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/binding.Makefile Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/binding.Makefile Sun Oct 27 01:49:58 2013 +0100 @@ -3,4 +3,4 @@ export builddir_name ?= build/./. .PHONY: all all: - $(MAKE) bufferutil validation + $(MAKE) validation bufferutil
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi Sun Oct 27 01:49:58 2013 +0100 @@ -34,81 +34,81 @@ "nodedir": "/home/rob/.node-gyp/0.10.11", "copy_dev_lib": "true", "standalone_static_library": 1, + "save_dev": "", + "browser": "", + "viewer": "man", + "rollback": "true", + "usage": "", + "globalignorefile": "/usr/local/etc/npmignore", + "init_author_url": "", + "shell": "/bin/bash", + "parseable": "", + "shrinkwrap": "true", + "userignorefile": "/home/rob/.npmignore", + "cache_max": "null", + "init_author_email": "", + "sign_git_tag": "", + "ignore": "", + "long": "", + "registry": "https://registry.npmjs.org/", + "fetch_retries": "2", + "npat": "", + "message": "%s", + "versions": "", + "globalconfig": "/usr/local/etc/npmrc", + "always_auth": "", + "cache_lock_retries": "10", + "fetch_retry_mintimeout": "10000", + "proprietary_attribs": "true", + "coverage": "", + "json": "", + "pre": "", + "description": "true", + "engine_strict": "", + "https_proxy": "", + "init_module": "/home/rob/.npm-init.js", + "userconfig": "/home/rob/.npmrc", + "npaturl": "http://npat.npmjs.org/", + "node_version": "v0.10.11", + "user": "1000", + "editor": "vi", + "save": "", + "tag": "latest", + "global": "", + "optional": "true", + "username": "", + "bin_links": "true", + "force": "", + "searchopts": "", + "depth": "null", + "rebuild_bundle": "true", + "searchsort": "name", + "unicode": "true", + "yes": "", + "fetch_retry_maxtimeout": "60000", + "strict_ssl": "true", + "dev": "", + "fetch_retry_factor": "10", + "group": "1000", "cache_lock_stale": "60000", - "pre": "", - "sign_git_tag": "", - "always_auth": "", + "version": "", + "cache_min": "10", + "cache": "/home/rob/.npm", + "searchexclude": "", + "color": "true", + "save_optional": "", "user_agent": "node/v0.10.11 linux x64", - "bin_links": "true", - "description": "true", - "fetch_retries": "2", + "cache_lock_wait": "10000", + "production": "", + "save_bundle": "", "init_version": "0.0.0", - "user": "", - "force": "", - "ignore": "", - "cache_min": "10", - "editor": "vi", - "rollback": "true", - "cache_max": "null", - "userconfig": "/home/rob/.npmrc", - "coverage": "", - "engine_strict": "", + "umask": "18", + "git": "git", "init_author_name": "", - "init_author_url": "", + "onload_script": "", "tmp": "/home/rob/tmp", - "userignorefile": "/home/rob/.npmignore", - "yes": "", - "depth": "null", - "save_dev": "", - "usage": "", - "https_proxy": "", - "onload_script": "", - "rebuild_bundle": "true", - "save_bundle": "", - "shell": "/bin/bash", - "prefix": "/usr/local", - "registry": "https://registry.npmjs.org/", - "browser": "", - "cache_lock_wait": "10000", - "save_optional": "", - "searchopts": "", - "versions": "", - "cache": "/home/rob/.npm", - "npaturl": "http://npat.npmjs.org/", - "searchsort": "name", - "version": "", - "viewer": "man", - "color": "true", - "fetch_retry_mintimeout": "10000", - "umask": "18", - "fetch_retry_maxtimeout": "60000", - "message": "%s", - "global": "", + "unsafe_perm": "", "link": "", - "save": "", - "unicode": "true", - "long": "", - "production": "", - "unsafe_perm": "true", - "node_version": "v0.10.11", - "tag": "latest", - "shrinkwrap": "true", - "fetch_retry_factor": "10", - "npat": "", - "proprietary_attribs": "true", - "strict_ssl": "true", - "username": "", - "dev": "", - "globalconfig": "/usr/local/etc/npmrc", - "init_module": "/home/rob/.npm-init.js", - "parseable": "", - "globalignorefile": "/usr/local/etc/npmignore", - "cache_lock_retries": "10", - "group": "1000", - "init_author_email": "", - "searchexclude": "", - "git": "git", - "optional": "true", - "json": "" + "prefix": "/usr/local" } }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -34,9 +34,5 @@ "url": "https://github.com/visionmedia/commander.js/issues" }, "_id": "commander@0.6.1", - "dist": { - "shasum": "88caaf137cea271459940e23a0c042a04f09cc11" - }, - "_from": "commander@~0.6.1", - "_resolved": "https://registry.npmjs.org/commander/-/commander-0.6.1.tgz" + "_from": "commander@~0.6.1" }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -31,9 +31,5 @@ "url": "https://github.com/rvagg/nan/issues" }, "_id": "nan@0.3.2", - "dist": { - "shasum": "0df1935cab15369075ef160ad2894107aa14dc2d" - }, - "_from": "nan@~0.3.0", - "_resolved": "https://registry.npmjs.org/nan/-/nan-0.3.2.tgz" + "_from": "nan@~0.3.0" }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -28,9 +28,5 @@ "url": "https://github.com/einaros/options.js/issues" }, "_id": "options@0.0.5", - "dist": { - "shasum": "2d72031aee9aa5099537bf1889d4a7bbbac89b7c" - }, - "_from": "options@>=0.0.5", - "_resolved": "https://registry.npmjs.org/options/-/options-0.0.5.tgz" + "_from": "options@>=0.0.5" }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -23,9 +23,5 @@ "url": "https://github.com/einaros/tinycolor/issues" }, "_id": "tinycolor@0.0.1", - "dist": { - "shasum": "db1fdd39324d12e8dadd7d35efb48c66af9438cc" - }, - "_from": "tinycolor@0.x", - "_resolved": "https://registry.npmjs.org/tinycolor/-/tinycolor-0.0.1.tgz" + "_from": "tinycolor@0.x" }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -56,9 +56,5 @@ "url": "https://github.com/einaros/ws/issues" }, "_id": "ws@0.4.31", - "dist": { - "shasum": "fed17bd81b4cc99cb79b75ffd49953fd3e7bf0d6" - }, - "_from": "ws@0.4.x", - "_resolved": "https://registry.npmjs.org/ws/-/ws-0.4.31.tgz" + "_from": "ws@0.4.x" }
--- a/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -34,9 +34,5 @@ "readme": "# node-XMLHttpRequest #\n\nnode-XMLHttpRequest is a wrapper for the built-in http client to emulate the\nbrowser XMLHttpRequest object.\n\nThis can be used with JS designed for browsers to improve reuse of code and\nallow the use of existing libraries.\n\nNote: This library currently conforms to [XMLHttpRequest 1](http://www.w3.org/TR/XMLHttpRequest/). Version 2.0 will target [XMLHttpRequest Level 2](http://www.w3.org/TR/XMLHttpRequest2/).\n\n## Usage ##\n\nHere's how to include the module in your project and use as the browser-based\nXHR object.\n\n\tvar XMLHttpRequest = require(\"xmlhttprequest\").XMLHttpRequest;\n\tvar xhr = new XMLHttpRequest();\n\nNote: use the lowercase string \"xmlhttprequest\" in your require(). On\ncase-sensitive systems (eg Linux) using uppercase letters won't work.\n\n## Versions ##\n\nPrior to 1.4.0 version numbers were arbitrary. From 1.4.0 on they conform to\nthe standard major.minor.bugfix. 1.x shouldn't necessarily be considered\nstable just because it's above 0.x.\n\nSince the XMLHttpRequest API is stable this library's API is stable as\nwell. Major version numbers indicate significant core code changes.\nMinor versions indicate minor core code changes or better conformity to\nthe W3C spec.\n\n## Supports ##\n\n* Async and synchronous requests\n* GET, POST, PUT, and DELETE requests\n* All spec methods (open, send, abort, getRequestHeader,\n getAllRequestHeaders, event methods)\n* Requests to all domains\n\n## Known Issues / Missing Features ##\n\nFor a list of open issues or to report your own visit the [github issues\npage](https://github.com/driverdan/node-XMLHttpRequest/issues).\n\n* Local file access may have unexpected results for non-UTF8 files\n* Synchronous requests don't set headers properly\n* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!).\n* Some events are missing, such as abort\n* getRequestHeader is case-sensitive\n* Cookies aren't persisted between requests\n* Missing XML support\n* Missing basic auth\n", "readmeFilename": "README.md", "_id": "xmlhttprequest@1.4.2", - "dist": { - "shasum": "29e7c595db1f3b0052ccfc45cfe4420f70946783" - }, - "_from": "xmlhttprequest@1.4.2", - "_resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.4.2.tgz" + "_from": "xmlhttprequest@1.4.2" }
--- a/node_modules/socket.io/node_modules/socket.io-client/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/node_modules/socket.io-client/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -63,9 +63,5 @@ "url": "https://github.com/LearnBoost/socket.io-client/issues" }, "_id": "socket.io-client@0.9.16", - "dist": { - "shasum": "b6bf3ef683b72ff4ebdb6620485173ccb794e714" - }, - "_from": "socket.io-client@0.9.16", - "_resolved": "https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.16.tgz" + "_from": "socket.io-client@0.9.16" }
--- a/node_modules/socket.io/package.json Sat Oct 26 14:45:34 2013 +0100 +++ b/node_modules/socket.io/package.json Sun Oct 27 01:49:58 2013 +0100 @@ -66,9 +66,5 @@ "url": "https://github.com/LearnBoost/socket.io/issues" }, "_id": "socket.io@0.9.16", - "dist": { - "shasum": "5ec34fc8d4a613b161b1b7efe143a40133eca250" - }, - "_from": "socket.io@", - "_resolved": "https://registry.npmjs.org/socket.io/-/socket.io-0.9.16.tgz" + "_from": "socket.io@" }
--- a/nodescore.js Sat Oct 26 14:45:34 2013 +0100 +++ b/nodescore.js Sun Oct 27 01:49:58 2013 +0100 @@ -14,6 +14,7 @@ , fs = require('fs') , static = require('node-static'); +/* var requirejs = require('requirejs'); requirejs.config({ @@ -23,6 +24,7 @@ nodeRequire: require, findNestedDependencies: true }); +*/ // run webserver serving static html //////////////////////////////////////////// @@ -40,7 +42,7 @@ }); }); -httpServer.listen(8890); +httpServer.listen(8000); //////////////////////////////////////////// @@ -57,7 +59,7 @@ //var sequencer = require('./sequencer') -io.set('log level', 1); // reduce logging +io.set('log level', 4); // reduce logging io.sockets.on('connection', function (socket) { socket.on('nickname', function (nick, fn) {