Skip to content

Instantly share code, notes, and snippets.

@funador
Last active January 18, 2019 02:48
Show Gist options
  • Save funador/16ef063f886b4f666711c0c950751c36 to your computer and use it in GitHub Desktop.
Save funador/16ef063f886b4f666711c0c950751c36 to your computer and use it in GitHub Desktop.
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