From the course: Databases for Node.js Developers
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Add MySQL and Sequelize to your project
From the course: Databases for Node.js Developers
Add MySQL and Sequelize to your project
- [Instructor] As you know, we store our basket in Redis, and now I want to transfer these basket items into an order when a user hits buy now, and this order should then be stored in MySQL, this is also a perfect use case for it, and as you might've guessed, we will use Sequalize as an abstraction for that. So let's head over to Visual Studio Code, and there I am in my shopper directory, I also have the application running. I stop it now. Please make sure that you are also in the shopper directory and there I now enter npm install sequelize and also MySQL too, because Sequelize works with a lot of different database systems, so we have to explicitly install the database driver that we want to use, and while this is installing I can already head over to server, config, index.js, and again, as we did with the other databases I will now add a new property, mysql, and in this MySQL property, I add a property…
Contents
-
-
-
-
-
-
-
(Locked)
When to use relational databases59s
-
(Locked)
Set up MySQL3m 20s
-
(Locked)
Create a database schema4m 17s
-
(Locked)
Use Node.js with MySQL9m 58s
-
(Locked)
Introduction to Sequelize2m 4s
-
(Locked)
Add MySQL and Sequelize to your project6m 28s
-
(Locked)
Review the database design2m
-
(Locked)
Create sequelize models8m 51s
-
(Locked)
Review the auto-generated database structure2m 20s
-
(Locked)
Implement an order service8m 29s
-
(Locked)
Add order management7m 13s
-
(Locked)
-