Created
January 30, 2014 19:31
-
-
Save hansent/8716949 to your computer and use it in GitHub Desktop.
models.js
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 mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/test'); | |
var db = mongoose.connection; | |
var Schema = mongoose.Schema; | |
var playerSchema = new Schema({ | |
name: String, | |
record: { | |
matches: { | |
won: Number, | |
lost: Number | |
}, | |
sets: { | |
won: Number, | |
lost: Number | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment