Skip to content

Instantly share code, notes, and snippets.

@francisngo
Created December 29, 2017 03:40
Show Gist options
  • Save francisngo/165ecc2c03880a3c851109567da9ff5c to your computer and use it in GitHub Desktop.
Save francisngo/165ecc2c03880a3c851109567da9ff5c to your computer and use it in GitHub Desktop.
User model to create and get users.
const mongoose = require('mongoose');
const Schema = mongoose.Schema;
module.exports = mongoose.model('User', new Schema({
name: String,
password: String,
admin: Boolean
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment