GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — freeCodeCamp/api at main · SayanSTR/freeCodeCamp

Expand file tree

/

api

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

api

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
__mocks__
__mocks__
 
 
prisma
prisma
 
 
src
src
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
jest.config.ts
jest.config.ts
 
 
jest.utils.test.ts
jest.utils.test.ts
 
 
jest.utils.ts
jest.utils.ts
 
 
package.json
package.json
 
 
tsconfig.build.json
tsconfig.build.json
 
 
tsconfig.json
tsconfig.json
 
 

README.md

Outline

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.

cd tools
docker compose up -d

Once that's running, update the connection string in the .env file to use port 27018.

# Database
MONGOHQ_URL=mongodb://127.0.0.1:27018/freecodecamp?directConnection=true

The new db will be empty, so you can run the seed script to populate it.

cd ../.. # back to the root of the repo
pnpm seed

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 [email protected] by setting the session cookie for that user.

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.