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

Add MySQL and Sequelize to your project

From the course: Databases for Node.js Developers

Start my 1-month free trial

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