From the course: Web Servers and APIs using C++
Unlock the full course today
Join today to access over 22,700 courses taught by industry experts or purchase this course individually.
Adding the MongoDB C++ drivers - C++ Tutorial
From the course: Web Servers and APIs using C++
Adding the MongoDB C++ drivers
- In order to access our database on mLab, we need to add the MongoDB C++ driver library to our code. Unfortunately, we can't simply download it. We need to build it. And before we can build the C++ library, we need to first build the C library it requires. Let's get a new Docker image that will build and install the libraries. So let's return to Atom. In Atom, we're gonna right click on "hello crow". We're gonna say new, folder, we're gonna name this folder "bbox". Then, the Docker file we need is a bit complicated. So to reduce errors I've provided a copy of it in the exercise files for Chapter 4 in section 04_03. So let's go back to our "Exercise Files", 04, 03. Here's our Docker file. We're gonna do a Command + C to copy it. Then we're gonna come back to Atom, we are gonna right click on "bbox". We're gonna click on "Show in Finder", with "bbox" selected. We're gonna do a Command + V to paste the Docker file. And we can just close that guy up. Come back here, reveal it, and click…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Creating an mLab account1m 40s
-
(Locked)
Uploading JSON data4m 39s
-
(Locked)
Adding the MongoDB C++ drivers3m 52s
-
Querying Mongo data15m 24s
-
(Locked)
Adding dynamic data to a page13m 35s
-
(Locked)
Challenge: Create a webpage with data32s
-
(Locked)
Solution: Create a webpage with data4m 50s
-
(Locked)
-
-
-