Last active
January 18, 2019 02:48
-
-
Save funador/16ef063f886b4f666711c0c950751c36 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose') | |
const Schema = mongoose.Schema | |
// Data we need to collect/confirm to have the app go. | |
const fields = { | |
email: { | |
type: String | |
}, | |
confirmed: { | |
type: Boolean, | |
default: false | |
} | |
} | |
// One nice, clean line to create the Schema. | |
const userSchema = new Schema(fields) | |
module.exports = mongoose.model('User', userSchema) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment