aboutsummaryrefslogtreecommitdiff
path: root/models/post.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/post.js')
-rw-r--r--models/post.js10
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;