brenmcnamara / Infindi-Backend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infindi-Backend

Build and Running Locally

Pre-Requisites

Install the following:

Do the Following

  1. Clone the repo, then cd path/to/repo
  2. You must acquire a .env file from the owner
  • You can find that file here if you have access permission
  • Download env.txt
  • Rename it to .env
  • Place it in the root of the repo
  1. yarn
  2. npm run build
  3. npm start

Deploying Web Service

NOTE: If your name is not Brendan McNamara, you should probably not be doing this.

Pre-Requisites

  1. Get a copy of the web environmnt variable file (not committed with the repo)
  2. gcloud must be installed in your local environment and you must be logged into the infindi account
  3. Get a copy of the firebase admin certificate (not committed with the repo)

Instructions

  • In the web directory, run: gcloud app deploy

Deploying Worker Service

NOTE: If your name is not Brendan McNamara, you should probably not be doing this.

Pre-Requisites

  1. Get a copy of the worker environmnt variable file (not committed with the repo)
  2. gcloud must be installed in your local environment and you must be logged into the infindi account
  3. Get a copy of the firebase admin certificate (not committed with the repo)

Instructions

  • In the worker directory, run: gcloud app deploy

Testing common and common-backend modules using Infindi-Backend

  1. Navigate to local common / common-backend repo and run:

yarn link

  1. Navigate back to infindi-backend repo and run:

yarn link common # or common-backend

  1. Make sure to run npm run build whenever adding changes to the common / common-backend code

  2. When done testing, run yarn unlink from common / common-backend

Manual Testing

Test Job Requests

  1. Test that multiple job workers can listen for job requests without: a. Grabbing the same request b. Skipping requests c. Working on the same request more than once

  2. Test that a job worker that fails will mark the job as failed with the correct error payload.

About


Languages

Language:JavaScript 99.9%Language:HTML 0.1%