Learn how to define main Mongoose schemas for the MEVN stack application.
- [Instructor] So in this video, we're going to be … developing our entity models, which is going to shape … the data that we use in our application. … So first, go into your dev-server folder, … and then create a new folder and we'll call it model, … and let's create the two main models that we'll be using … which is the user-model and then the task-model. … So, Mongoose is a object modeling library for node.js. … So if you want to learn more about that … you can head over to mongoosejs.com, … and it gives you the steps on how to define schemas … and how to work with queries. … So first, let's go ahead and import the mongoose library. … Then, let's define our schema and save it … to a variable called taskSchema. … So, you can just do new mongoose.Schema. … And then, let's make sure we export this. … So, export default and mongoose.model, … and then you just name the model … and followed by the schema for that model. … So, inside of here, you define all the fields that you want, … so I have a title, which is a String, …
- Single-page applications and Vue.js
- Preparing your development environment
- Creating a Vue.js application
- Using the Vue.js router
- Building a RESTful back-end API with Node.js and Express.js
- Connecting to MongoDB
- Validating and managing a user session
- Connecting Vue.js to a back-end server
Skill Level Intermediate
1. Getting to Know the MEVN Stack
2. Preparing Your Development Environment
3. Vue.js Core Concepts
4. Building a RESTful Back-End API with Node.js and Express.js
Check HTTP status codes3m 17s
5. Connecting Your Application to MongoDB
6. User Authentication, JWTs, and Session Management
7. Finalizing Your Application
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.