课程: Databases for Node.js Developers (2021)
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Use Node.js with Redis
- [Tutor] We will now use our Maxcoin application again, and we will implement what we did before with MongoDB now with Redis. For that I open Maxcoin and here the main Main-js file, and please also make sure that you are in the Maxcoin directory on the terminal. Let me will first just copy this mongoBackend require and do some renaming, so I call it RedisBackend equals require, and I will require the RedisaBackend that exists all ready, and then I will rename this run function into runMongo, so that we can reuse it later again, but I will also add a new function, runRedis, and it will copy paste runMongo for that simply and rename it to runRedis. And of course, here we have to now make an instance of RedisBackend and call RedisBackend max. Now, we also of course, have to call runRedis instead of run, everything else can stay the same, right now runMongo is unused. Now I head over to services and to the RedisBackend, and…
内容
-
-
-
-
-
-
(已锁定)
Introduction to key-value stores5 分钟 10 秒
-
(已锁定)
Set up Redis2 分钟 43 秒
-
(已锁定)
Use Node.js with Redis9 分钟 45 秒
-
(已锁定)
Add Redis to your project5 分钟 57 秒
-
(已锁定)
Session management in Express3 分钟 33 秒
-
(已锁定)
Add Redis sessions to your project4 分钟 27 秒
-
(已锁定)
Implement a basket service6 分钟 23 秒
-
(已锁定)
Add the basket to the page9 分钟 28 秒
-
(已锁定)
-
-