blob: af53543dcc913417b108ff7259236bc47406c41a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
const mongoose = require('mongoose');
const postSchema = new mongoose.Schema({
title: String,
text: String,
date: {type: Date, default: Date.now}
});
const postModel = mongoose.model('post', postSchema);
module.exports = postModel;
|