课程: Databases for Node.js Developers (2021)
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
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…
内容
-
-
-
-
-
-
-
(已锁定)
When to use relational databases59 秒
-
(已锁定)
Set up MySQL3 分钟 20 秒
-
(已锁定)
Create a database schema4 分钟 17 秒
-
(已锁定)
Use Node.js with MySQL9 分钟 58 秒
-
(已锁定)
Introduction to Sequelize2 分钟 4 秒
-
(已锁定)
Add MySQL and Sequelize to your project6 分钟 28 秒
-
(已锁定)
Review the database design2 分钟
-
(已锁定)
Create sequelize models8 分钟 51 秒
-
(已锁定)
Review the auto-generated database structure2 分钟 20 秒
-
(已锁定)
Implement an order service8 分钟 29 秒
-
(已锁定)
Add order management7 分钟 13 秒
-
(已锁定)
-