Last active
June 8, 2017 17:07
-
-
Save alesanabriav/8a9d42fa55ecd2319e9e3cdf12e9b123 to your computer and use it in GitHub Desktop.
mongoose model example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let postSchema = new mongoose.Schema({ | |
title: { type: String }, | |
author: { type: String }, | |
body: { type: String } | |
)}; | |
mongoose.model('Post', postSchema); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment