This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sys = require('sys') | |
| var couch = require('node-couchdb/lib/couchdb') | |
| var client = couch.createClient(5984,'localhost'); | |
| var db = client.db('server') | |
| var document = | |
| { | |
| names: [], | |
| scores: [], | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sys = require('sys') | |
| var couch = require('node-couchdb/lib/couchdb') | |
| var client = couch.createClient(5984,'localhost'); | |
| var db = client.db('server') | |
| var document = | |
| { | |
| names: [], | |
| scores: [], | |
| _rev: "blah" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sys = require('sys') | |
| var couch = require('node-couchdb/lib/couchdb') | |
| var client = couch.createClient(5984,'localhost'); | |
| var db = client.db('server') | |
| var document = | |
| { | |
| names: [], | |
| scores: [], | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sys = require('sys') | |
| var couch = require('node-couchdb/lib/couchdb') | |
| var client = couch.createClient(5984,'localhost'); | |
| var db = client.db('server') | |
| var document = | |
| { | |
| names: [], | |
| scores: [], | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sys = require('sys') | |
| var couch = require('node-couchdb/lib/couchdb') | |
| var client = couch.createClient(5984,'localhost'); | |
| var db = client.db('server') | |
| var document = | |
| { | |
| names: [], | |
| scores: [], | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sys = require('sys') | |
| var couch = require('node-couchdb/lib/couchdb') | |
| var client = couch.createClient(5984,'localhost'); | |
| var db = client.db('server') | |
| var document = | |
| { | |
| names: [], | |
| scores: [], | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| assert = require('assert'); | |
| var db = require('../server/models/database'); | |
| db.use_db('test'); | |
| function setup() | |
| { | |
| db.add_to_list("blah",10); | |
| db.add_to_list("great",20); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| assert = require('assert'); | |
| var sys = require("sys"); | |
| var db = require('../server/models/database'); | |
| db.use_db('test'); | |
| function setup() | |
| { | |
| db.add_to_list("blah",10); | |
| db.add_to_list("great",20); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;;display | |
| ;;;;Make way for more screen real-estate | |
| (scroll-bar-mode -1) | |
| (tool-bar-mode -1) | |
| (menu-bar-mode -1) | |
| ;;;;Spacing and indentation | |
| (setq-default indent-tabs-mode nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ScoreNetwork(score) | |
| { | |
| this.ws = null; | |
| this.data = null; | |
| this.score = score; | |
| this.initialize = function(){ | |
| this.ws = new WebSocket('ws://localhost:7000'); | |
| this.ws.onmessage = function(event) |