Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Data Relationships with SQL and Sequelize!
You have completed Data Relationships with SQL and Sequelize!
Preview
Let's explore how to create data relationships using Sequelize by updating a simple Node.js application.
Starter Project structure
The starter project contains the following files and folders:
-
db- Contains modules responsible for interacting with the database-
models- Contains the Sequelize models for the application -
index.js- Configures the Sequelize ORM
-
-
.eslintrc.json- ESLint configuration file -
app.js- The entry point into the application. Within this file, the Sequelize models are used to create and retrieve data from the database. -
package-lock.json- Generated by npm to describe the application's exact dependency tree -
package.json- npm configuration file
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
All right, let's explore how to create
data relationships using Sequelize by
0:00
updating a simple Node.js application.
0:01
To get started and follow along, download
the project files with this video, and
0:03
open them in your preferred text editor,
I'm using Visual Studio Code.
0:07
As you follow this course,
you'll make changes to the app.js file,
0:11
and the movie.js, and
person.js files in the db/models folder.
0:16
Be sure to review the teachers notes with
this video to learn more about what's
0:20
included in the project files.
0:24
The project contains two models,
person and movie.
0:25
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up