Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Last active December 17, 2015 17:49
Show Gist options
  • Select an option

  • Save ELLIOTTCABLE/5649078 to your computer and use it in GitHub Desktop.

Select an option

Save ELLIOTTCABLE/5649078 to your computer and use it in GitHub Desktop.
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
var userSchema = mongoose.Schema({
name : String,
surname : String,
});
var User = mongoose.model('User', userSchema);
exports.User = User;
var models = require('./model');
var UserModel = models.User;
exports.index = function(req, res){
res.render('index', { title: 'Express' });
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment