Skip to content

Instantly share code, notes, and snippets.

@bunnyhawk
Created July 12, 2015 00:06
Show Gist options
  • Save bunnyhawk/ffba849dd03c40445863 to your computer and use it in GitHub Desktop.
Save bunnyhawk/ffba849dd03c40445863 to your computer and use it in GitHub Desktop.
Account.js for login-example
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var passportLocalMongoose = require('passport-local-mongoose');
var Account = new Schema({
username: String,
password: String
});
Account.plugin(passportLocalMongoose);
module.exports = mongoose.model('Account', Account);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment