/rithm-challenge-api

Backend for my submission for the API challenge from Rithm

Primary LanguageJavaScript

Rithm Challenge Submission: API

The backend for my submission for the API technical challenge provided by Rithm. Check out the client here

Project Setup

  1. Clone the application and cd into the project directory.

  2. Install dependencies:

npm i
  1. Copy the contents of .sample.env into a .env file
cat .sample.env > .env
  1. Populate the .env file with your PostgreSQL database URL's (e.g., postgres://user:password@127.0.0.1:5432)

  2. Migrate the database:

npx knex migrate:latest
  1. Seed the database with csv data:
npx knex seed:run
  1. Run the dev server
npm run start:dev

Tests

To run tests, make sure the test database URL is populated in the .env file and run npm test

Libraries and Technologies Used

To-Do

  • Support API pagination
    • First iteration: SQL LIMIT + OFFSET
  • Security
    • SQL Injection
    • CORS
  • Tests
    • Code coverage
    • test cases for large queries
  • CRUD