Created
July 19, 2017 12:46
-
-
Save mhdatie/37f6f62e2f877ee76b475425650529c0 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; | |
const CounterSchema = new Schema({ | |
_id: { type: String, required: true }, | |
count: { type: Number, default: 0 } | |
}, { | |
timestamps: true, | |
collection: 'counters' | |
}); | |
module.exports = mongoose.model('CounterModel', CounterSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment