Created
August 13, 2013 13:44
-
-
Save DomiR/6221265 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 mongoose = require('mongoose'); | |
mongoose.connect('mongodb://localhost/contact'); | |
var Schema = mongoose.Schema; | |
var ContactSchema= new Schema({ | |
name: { type: String, required: true }, | |
phone: { type: Number }, | |
}); | |
var ContactModel = mongoose.model('Contact', ContactSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment