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
| /** | |
| * Node.JS Sinatra Style Routing | |
| */ | |
| var routes = {} | |
| , http = require('http') | |
| , parse = require('url').parse | |
| , server = http.createServer(); | |
| /** |
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
| /** | |
| * Uses MongooseJS to Connect to MongoDB | |
| * .Maps out all collections within | |
| */ | |
| var mongoose = require('mongoose') | |
| , MONGO_DB = 'mongodb://localhost/test'; | |
| mongoose.connect(MONGO_DB); |
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
| /*! | |
| __defineGetter__(<ANSI supported color>, fn | |
| http://en.wikipedia.org/wiki/ANSI_escape_code#CSI_codes | |
| */ | |
| ['magenta','yellow','green','blue','cyan','red'].forEach(function(color) { | |
| var colorized = '\u001b[#m'; | |
| String.prototype.__defineGetter__(color, function(){ | |
| var options = { |
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 child | |
| , stdout = '' | |
| , stderr = '' | |
| , exitCode = 0 | |
| , vows = require('vows') | |
| , path = require('path') | |
| , assert = require('assert') | |
| , request = require('request') | |
| , spawn = require('child_process').spawn; |
NewerOlder