An HTTP server equipped to run SQL and MongoDB queries for Pairwise database challenges.
Install NodeJS, yarn, and Docker and run the following:
# Install dependencies
$ yarn install
# Setup
$ yarn setup
# Run postgres and mongodb using docker
$ yarn up
# Run the server for development
$ yarn watch
This will run the databases locally for development using Docker Compose and run the server in watch mode. If you are working with Codepress, you will need to make sure the DATABASE_CHALLENGE_API
in the browser-test-lib.ts
file points to localhost
address where this server is running.
To build the project, you can run:
# Run the build
$ yarn build
The project also has some linting rules and tests:
# Apply formatting rules
$ yarn format
# Run project unit tests
$ yarn test:unit
# Run project linting and tests
$ yarn test
This project is deployed using GCP Cloud Build triggers to Google App Engine: check it out live. It connects to a Postgres database hosted on Cloud SQL and a MongoDB database hosted on MongoDB Atlas.