Created
July 8, 2017 03:58
-
-
Save marshallswain/d5cc944125f9fdda1539cdf28c29d1ad to your computer and use it in GitHub Desktop.
Simple Mongoose Schema
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
// address-map-model.js - A mongoose model | |
// | |
// See http://mongoosejs.com/docs/models.html for more of what you can do here. | |
module.exports = function (app) { | |
const mongooseClient = app.get('mongooseClient') | |
const addressMap = new mongooseClient.Schema({ | |
identifier: { type: String, required: true }, | |
address: { type: String, required: true } | |
}) | |
return mongooseClient.model('addressMap', addressMap) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment