database-creation.mp4
-
Log into your DigitalOcean account.
-
Open "Manage > Databases" in the left menu.
-
Click the blue "Create Database" button.
-
The default choices should be correct for this lab. Click "Create Database Cluster" at the bottom of the page.
-
Provisioning your database will take about 5 minutes. Might be time to refill your water, or grab a quick snack.
REMINDER: You won't be able to complete this step until your database is provisioned.
-
Download and install MongoDB Compass if not already installed.
-
Copy your connection string from the DigitalOcean console. (It will copy the password automatically.)
-
In Compass, click on "Connections" and select "New Connection" in the left panel.
-
Paste the connection string into the "URI" field.
-
Give the connection a name and choose a color if you prefer, then click "Save & Connect".
-
Click on the "Create Database" button next to the name of the connection. It looks like this, ➕ (a plus symbol).
-
For the "Database Name", use
funko-database
. -
For the "Collection Name", use the name
funko-collection
.
-
Download this starter JSON data file to your machine. (download)
-
Click the "Import Data" button to add the JSON file.
-
Click "Import" to upload your data to your collection.
-
Congratulations! You've created your database!
As you looked at the data we imported, you should have noticed an empty "imageUrl" field for each one. We will need to create some storage to hold these images, and then we will need to update our data to point to those images.