diff --git a/src/content/docs/how-to-setup-freecodecamp-locally.mdx b/src/content/docs/how-to-setup-freecodecamp-locally.mdx index e2aeb394..4ab5ea56 100644 --- a/src/content/docs/how-to-setup-freecodecamp-locally.mdx +++ b/src/content/docs/how-to-setup-freecodecamp-locally.mdx @@ -328,17 +328,20 @@ pnpm install ### Step 3: Start MongoDB and Seed the Database -Before you can run the application locally, you will need to start a MongoDB Server as a replica set. +Before you can run the application locally, you will need to start a MongoDB server as a replica set. + +freeCodeCamp uses Prisma with MongoDB, and some database operations require transaction support. MongoDB transactions require the server to run as a replica set, even in local development. -1. Stop any existing MongoDB server that uses port 27017 (if you already have a replica set running on that port, you can skip this and the next step) +1. Stop any existing MongoDB server that uses port `27017`. + + If you already have a MongoDB server running without replica set mode, you may encounter errors when trying to initialize or use the database for local development. 1. Start the MongoDB server as a replica set: ```bash docker compose -f docker/docker-compose.yml up -d - ``` 1. Seed the database and setup a new user: