Skip to content

Instantly share code, notes, and snippets.

@FrancescaK
Created October 4, 2012 10:41
Show Gist options
  • Select an option

  • Save FrancescaK/3832893 to your computer and use it in GitHub Desktop.

Select an option

Save FrancescaK/3832893 to your computer and use it in GitHub Desktop.
require:mongoose
var mongoose = require('mongoose'),
Schema = mongoose.Schema,
bcrypt = require(bcrypt),
SALT_WORK_FACTOR = 10;
var UserSchema = new Schema({
username: { type: String, required: true, index: { unique: true } },
password: { type: String, required: true }
});
module.exports = mongoose.model(User&, UserSchema);
@JuanjoFR
Copy link
Copy Markdown

Line 3:
bcrypt = require('bcrypt'),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment