Articles
Latest
More
Newsletter Sponsorship Discord About
Sign up for our Newsletter
The video for this lesson is currently being updated, please read the transcript instead.
Full-Stack Vue + Node > Lesson 19

Refactoring using schema

In this video, we'll move our new models to a better location in our code.

Firstly, let's create a new directory models, then we'll create files for our two model types.

$ mkdir server/models
$ touch server/models/item.js server/models/user.js

Creating item model

Now we'll move the model code from the main script into those files so that our code is better organized.

Let's start with item.js. I'll cut this from the index and paste it into this new file.


Back to course page

Click to load comments...

Articles
  • Latest
Newsletter
  • Join
  • Sponsorship
More
  • Discord
  • Vue.js jobs
  • About

Vue.js Developers © 2021. View our privacy policy .

  • RSS
  • |
  • Atom