mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 18:32:50 +00:00
working on post upload
This commit is contained in:
12
models/posts.js
Normal file
12
models/posts.js
Normal file
@@ -0,0 +1,12 @@
|
||||
var mongoose = require('mongoose');
|
||||
|
||||
var postsSchema = new mongoose.Schema({
|
||||
title: String,
|
||||
date: Date,
|
||||
intro: String,
|
||||
file: String,
|
||||
updated: {type: Date, default: Date.now}
|
||||
});
|
||||
|
||||
|
||||
mongoose.model('posts', postsSchema);
|
||||
Reference in New Issue
Block a user