π 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 .env
. This file contains the configuration for the application.
- π NodeJS/Express
- βοΈ Java Spring Boot
File: server/.env
PORT=5000
DATABASE_URI="mongodb+srv://user:password@serverurl"
DATABASE_NAME="library"
SECRET="secret"
File: /java-server/src/main/resources/.env
DATABASE_NAME=library
# Add here the MongoDB URI of your database cluster
DATABASE_URI=
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.
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.
- π NodeJS/Express
- βοΈ Java Spring Boot
The file will automatically save, and the server will restart.
You need to start the server. Click on the terminal window and type:
mvn spring-boot:run
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!
- π NodeJS/Express
- βοΈ Java Spring Boot


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.

Clicking this will reload the client, which should now be connected to the database. You should see the application with some books listed now.
Open the client in a new windowβ
If you accidentally close the Client or want to open it in a separate tab/window go to the Ports tab, hover over Client and a world icon should appear. Click it and the client will open in a new tab.
