9 lines
213 B
JavaScript
9 lines
213 B
JavaScript
const mongoose = require('mongoose');
|
|
|
|
const postSchema = mongoose.Schema({
|
|
title: {type: String, required:true},
|
|
content: {type: String, required:true}
|
|
});
|
|
|
|
module.exports = mongoose.model('Post', postSchema);
|