Skip to content

Instantly share code, notes, and snippets.

@ayxos
Last active August 29, 2015 13:56
Show Gist options
  • Save ayxos/8811968 to your computer and use it in GitHub Desktop.
Save ayxos/8811968 to your computer and use it in GitHub Desktop.
var mongoose = require( 'mongoose' );
var Schema = mongoose.Schema;
var Model = new Schema({
name : String,
surname : String,
age : Number
});
var regModel = mongoose.model( 'Model_name', Model );
mongoose.connect( 'mongodb://localhost/db1' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment