Skip to content

Instantly share code, notes, and snippets.

@marshallswain
Created July 8, 2017 03:58
Show Gist options
  • Save marshallswain/d5cc944125f9fdda1539cdf28c29d1ad to your computer and use it in GitHub Desktop.
Save marshallswain/d5cc944125f9fdda1539cdf28c29d1ad to your computer and use it in GitHub Desktop.
Simple Mongoose Schema
// 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