From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Create MongoDB database - Next.js Tutorial
From the course: Next.js 14 from Scratch: Build a Real-World Project Using Next.js 14 and MongoDB
Create MongoDB database
All right, so now we're going to start to work on setting up our database. So we have a lot to do in this section. We need to create the database. We're going to import some data through a tool called Compass. We're going to create our connection configuration, create our models, and then start to fetch our data into our application rather than using the JSON file that we're using right now. All right, so we are using MongoDB, which is a NoSQL database. It's also called a document database. And it stores collections of data. And the data is stored in something called a document that's very similar to a JSON object or a JSON array. So if you've worked with JSON, then you're going to have no problem really understanding how the records are stored. It's much different than a relational database. Now, we're going to be using MongoDB Atlas, which is the cloud version. And this is the more common way to do things these days, is to host your database in the cloud. And that means that you…
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)
Create MongoDB database8m 44s
-
(Locked)
MongoDB Compass and importing data4m 36s
-
(Locked)
Database connection and Mongoose6m 31s
-
(Locked)
Your first API route6m 5s
-
(Locked)
Property and user models12m 30s
-
(Locked)
Fetch data using server component9m 48s
-
(Locked)
Requests file4m 25s
-
(Locked)
Fetch single property10m 51s
-
(Locked)
Single property page11m 54s
-
(Locked)
Property details component15m 34s
-
(Locked)
Spinner component2m 37s
-
(Locked)
-
-
-
-
-
-
-