diff options
Diffstat (limited to 'models')
-rw-r--r-- | models/post.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/models/post.js b/models/post.js new file mode 100644 index 0000000..3f341d1 --- /dev/null +++ b/models/post.js @@ -0,0 +1,10 @@ +const mongoose = require('mongoose'); + +const postSchema = new mongoose.Schema({ + title: String, + text: String +}); + +const postModel = mongoose.model('post', postSchema); + +module.exports = postModel; |