Skip to main content

πŸ‘ Configure the Application

Now that your environment is set up, you can configure the application.

There should already be a file open in the IDE. If not, look in the file explorer on the left, and open the file server/.env. This file contains the configuration for the application.

The file should look like this:

PORT=5000
DATABASE_URI="mongodb+srv://user:password@serverurl"
DATABASE_NAME="library"
SECRET="secret"

You'll need to change the DATABASE_URI parameter to match your connection string. That's the same one you used to import the data.

tip

Don't remember how to get your connection string? Check out the Import Data section.

Copy and paste your connection string into the DATABASE_URI parameter. The file will automatically save, and the server will restart.

In the Terminal tab at the bottom, look for the Server is running on port: 5000 line. If you see it, you're good to go!

The terminal panel

Reload the client​

Now that the server is running, you can reload the client to see the application.

In the upper right panel, click the refresh icon to reload the client.

The refresh icon

Clicking this will reload the client, which should now be connected to the database. You should see the application with some books listed now.