Skip to content

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

Notifications You must be signed in to change notification settings

pairwise-tech/database-challenge-api

Repository files navigation

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.

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published