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.
Use Node.js with MySQL
From the course: Databases for Node.js Developers
Use Node.js with MySQL
- As you may have guessed I'm now back at my maxcoin sample application and also in this maxcoin directory on my console in like for MongoDB and redis I now also have to install a driver and I will use mysql2 for that. There is also regular mysql package but mysql2 is a little bit more modern. For instance, it's a puts promises. So now type mysql, npm install mysql2. This will pull down the driver and I can already open my main js file and they will now bring in the mysql backend because the file already exists but we have to implement it still. So copy this line here for the RedisBackened and just rename it to MySQLBackened and I also have to change the pass here to MySQLBackend and then I have to create this connection functions so I will simply copy, runRedis and call it runMySQL and of course want to have the mySQLBackend here and for that I have to do new MySQLBackend, and then in the end I the call…
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)
-