freeCodeCamp/api
Oliver Eyton-Williams 36b06be8ce
chore: extend lint:ts to cover api (#49793)
* fix: include express-session types + suppress err

* chore: add api to lint:ts

* fix: remove unnecessary typeRoots config
2023-03-22 17:59:46 +05:30
..
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): setup jest in new api (#49709) 2023-03-16 20:33:40 +05:30
prisma feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
routes feat(api): create a demo type provider for typebox (#49536) 2023-03-15 14:21:25 +00:00
schemas feat(api): create a demo type provider for typebox (#49536) 2023-03-15 14:21:25 +00:00
tools feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
utils feat(api): use pino-pretty for dev logging (#49713) 2023-03-16 15:42:01 +00:00
index.test.ts feat(api): setup jest in new api (#49709) 2023-03-16 20:33:40 +05:30
index.ts chore: extend lint:ts to cover api (#49793) 2023-03-22 17:59:46 +05:30
jest.config.ts feat(api): setup jest in new api (#49709) 2023-03-16 20:33:40 +05:30
package.json chore: extend lint:ts to cover api (#49793) 2023-03-22 17:59:46 +05:30
README.md feat(api): add prisma as orm (#49413) 2023-03-14 17:29:55 +00:00
tsconfig.json chore: extend lint:ts to cover api (#49793) 2023-03-22 17:59:46 +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