Skip to content

Commit

Permalink
User model
Browse files Browse the repository at this point in the history
  • Loading branch information
daraosn committed May 10, 2012
1 parent 1fc4f80 commit c050795
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions app.js
Expand Up @@ -34,6 +34,7 @@ app.configure('production', function(){
// Models

global.Event=new require('./models/event')(mongoose);
global.User=new require('./models/user')(mongoose);

// How to use: Example
// =======
Expand Down
10 changes: 10 additions & 0 deletions models/user.js
@@ -0,0 +1,10 @@
module.exports=function User(mongoose) {
var Schema = mongoose.Schema
, ObjectId = Schema.ObjectId;
var schema = new Schema({
email : { type: String }
, name : { type: String }
});
var model=mongoose.model('User', schema);
return model;
};

0 comments on commit c050795

Please sign in to comment.