Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/content/docs/how-to-setup-freecodecamp-locally.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<Steps>

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:

Expand Down
Loading