In this video, learn how to implement a shopping basket that stores its data in Redis.
- [Instructor] Every shopping application…needs a shopping cart.…So if users want to buy an item,…they will add it to the cart…and once they have all items together,…they can enter checkout process and buy.…So we need a way to store a list of items…and quantities for a user.…Of course, we could simply create the carts…directly on the session that's in array,…but this would mean that if the user logs in…from another device, which would imply a new session,…they would lose the cart.…So we need to persist the cart somewhere…and Redis is a good back end for that.…
So let's start implementing the service module for that.…So I open Server and there I open…BasketService.gs,…it's still empty and here we can now start…implementing all methods that we need…when dealing with our basket.…First, we have to create an export function.…Module.exports…and this function will now…accept a client as parameter…'cause…as I said before, we will maintain the Redis…connection in our…config object and…somehow we have to pass it in then…from our routes.…
- Basics of relational and nonrelational databases
- Preparing your environment
- When to use document databases
- Inserting data into MongoDB
- Basic insert operations for MongoDB
- Querying data from MongoDB with Node.js
- Using key-value stores
- Using relational databases with Node.js
- Adding MySQL and Sequelize to a project
Skill Level Intermediate
Node.js: Build Your First Microservicewith Daniel Khan2h 9m Intermediate
Building a Website with Node.js and Express.jswith Ray Villalobos3h 16m Intermediate
1. Get Started with Databases for Node.js
2. Prepare Your Environment
3. Use Document Databases with Node.js
4. Use Key-Value Stores with Node.js
5. Use Relational Databases with Node.js
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.