mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-13 21:02:08 +08:00
|
|
||
|---|---|---|
| .. | ||
| db | ||
| middleware | ||
| plugins | ||
| prisma | ||
| routes | ||
| schemas | ||
| tools | ||
| utils | ||
| index.test.ts | ||
| index.ts | ||
| jest.config.ts | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
Connecting to local database
The api uses the ORM Prisma and it needs the MongoDB instance to be a replica set.
Atlas
If you use MongoDB Atlas, the set is managed for you.
Local
The simplest way to run a replica set locally is to use the docker-compose file in /tools. First disable any running MongoDB instance on your machin, then run the docker-compose file.
cd tools
docker compose up -d