freeCodeCamp/api
2023-03-14 17:29:55 +00:00
..
db feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
middleware feat(api): sessions management (#49499) 2023-03-09 20:36:33 +05:30
plugins feat(api): sessions management (#49499) 2023-03-09 20:36:33 +05:30
prisma feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
routes feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
tools feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
utils feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
index.ts feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
package.json feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
README.md feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
tsconfig.json feat(next-api): basic authentication setup (#49378) 2023-02-24 17:26:40 +05:30

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