Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
2333tracy authored Dec 10, 2020
1 parent 8b284d6 commit 3325d46
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions model/note.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
var mongoose = require('mongoose');

// connect mongoDb
mongoose.connect('mongodb://localhost/test3', {
useNewUrlParser: true,
useUnifiedTopology: true
})

var Schema = mongoose.Schema;

var blogSchema = new Schema({
tutor: String,
major: String,
imgSrc: String,
grade: String,
body: String,
date: {
type: Date,
default: Date.now
}
})

var Blog = mongoose.model('Blog', blogSchema);


module.exports = Blog

0 comments on commit 3325d46

Please sign in to comment.