Files
freeCodeCamp/api
Niraj Nandish 032f9d95ae feat(api): add update privacy terms endpoint (#50300)
* feat: move update privacy terms route

* test: update privacy terms route tests

* feat: add /settings prefix to settings route

* fix: updated routes in tests

* Revert "fix: updated routes in tests"

This reverts commit 4a1305e135.

* Revert "feat: add /settings prefix to settings route"

This reverts commit 2a0d4566fe.
2023-05-15 13:21:32 -07:00
..
2023-03-29 18:08:38 +05:30

Working on the new api

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 machine, then run the docker-compose file.

cd tools
docker compose up -d

Login in development/testing

During development and testing, the api exposes the endpoint GET auth/dev-callback. Calling this will log you in as the user with the email foo@bar.com by setting the session cookie for that user.