Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mongoose = require('mongoose');
- // schema representing user data
- var UserSchema = new mongoose.Schema({
- username: String,
- email: String,
- bio: String,
- image: String,
- hash: String,
- salt: String
- }, {timestamps: true});
- // register the schema with mongoose as 'User'
- mongoose.model('User', UserSchema);
Advertisement
Add Comment
Please, Sign In to add comment