mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-05 14:00:41 -05:00
* chore: compile TS into /dist Having the output co-located with the source meant that the js would be imported by default. Given that we don't recompile on source changes, this means the server got 'stuck' at the point of compilation and would only register changes on build. Also, compiling to a dist directory should make it easier to build when we want to deploy. That said, the motivation is mostly DX. * fix: put schema.prisma in the default location
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