Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 1.29 KB

README.md

File metadata and controls

47 lines (31 loc) · 1.29 KB

Pairwise Database Challenge API

An HTTP server equipped to run SQL and MongoDB queries for Pairwise database challenges.

Getting Started

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

Deployment

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.