课程: Databases for Node.js Developers (2021)
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Insert data into MongoDB
- [Narrator] Now we are going to fetch the data from the API and insert it into Mongo DB and always when working with APIs, it makes sense to actually look at the date that we will get back and I already did this by just calling the API without the start and the end date this will give me the last seven days, so that's long enough to understand the structure in that just copy that, returned from the API and in vicious to the code. I will just create a new file data.Jason, to when I save it, then I get formatting and then I see how this data actually looks like. We see that we have a property PPI so this property PPI contains a list of dates and the intercourse for this date. And we want to create an entry for each date so a new document in our database for each date. So let's implement that in my Mongo back end chess, I now scroll down to the insert method and there I start with just fetching the data from the API so at…
内容
-
-
-
-
-
(已锁定)
When to use and not to use document databases2 分钟 11 秒
-
(已锁定)
Set up MongoDB4 分钟 39 秒
-
(已锁定)
Connect to MongoDB13 分钟 54 秒
-
(已锁定)
Insert data into MongoDB6 分钟 43 秒
-
(已锁定)
Query data from MongoDB4 分钟 41 秒
-
(已锁定)
Introduction to Mongoose9 分钟 24 秒
-
(已锁定)
Add MongoDB and Mongoose to your project5 分钟 57 秒
-
(已锁定)
Define your first schema and model3 分钟 50 秒
-
(已锁定)
Prepare the item management system6 分钟 4 秒
-
(已锁定)
Implement all database methods7 分钟 48 秒
-
(已锁定)
Implement the user management system7 分钟 26 秒
-
(已锁定)
Encrypting passwords4 分钟 40 秒
-
(已锁定)
-
-
-