Skip to content

Instantly share code, notes, and snippets.

@Nomon
Created January 31, 2012 08:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nomon/1709433 to your computer and use it in GitHub Desktop.
Save Nomon/1709433 to your computer and use it in GitHub Desktop.
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);
var schema = exports.schema = new Schema('redis', {
port: 6379,
host: "localhost"
});
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