Created
August 28, 2014 16:32
-
-
Save shivasurya/f99230c47b672c0d2ccf to your computer and use it in GitHub Desktop.
Simple Schema for mongoose DB
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 mongoose = require('mongoose'); | |
var movie_api = mongoose.Schema({ | |
movie : { | |
name : String, | |
year : String, | |
director : String, | |
genre : String, | |
thumb : String , | |
music : String, | |
rating : Number , | |
} | |
}); | |
//you can have methods here | |
module.exports = mongoose.model('movie', movie_api); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment