Created
January 31, 2012 08:11
-
-
Save Nomon/1709433 to your computer and use it in GitHub Desktop.
This file contains 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 repl = require('repl'); | |
var jugglingdb = require('jugglingdb'); | |
var schema = require('./lib/model/schema').schema; | |
var Model = require('./lib/model'); | |
var util = require('util'); | |
var User = Model.User.User; | |
var Channel = Model.Channel.Channel; | |
var Network = Model.Network.Network; | |
var Server = Model.Server.Server; | |
var connect = require('connect'); | |
connect.createServer(function(req,res) { | |
User.find(2,function(e,u) { | |
res.end(u.name); | |
}); | |
}).listen(3456); |
This file contains 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 schema = exports.schema = new Schema('redis', { | |
port: 6379, | |
host: "localhost" | |
}); |
This file contains 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 schema = require('./schema').schema; | |
var User = exports.User = schema.define('User', { | |
name: String, | |
authType: String, | |
authId: Number | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment