Job application submission for Bitespeed Backend Task. Assignment link
👉🏾 My resume
This REST API is deployed to Netlify functions and the database of choice is Postgres (Supabase). Reason for choosing them is that they have generous free tiers.
Identify POST endpoint - https://identity-reconciliation-test.netlify.app/api/identify
- Node
>16.0
(Should work in 14, although netlify binaries are recommended to be run on 16 and above) - Postgres service running (either as a stand-alone process or a docker image)
netlify
executable installed. This can be installed withnpm i -g netlify
. The API is deployed as a Netlify function (for demo purposes therefore, you need the netlify binaries to execute the functions). For more information on how the API is hosted and redirected, check out thenetlify.toml
file
- Create a
.env
file that would contains 2 variables as below
DIRECT_URL="postgresql://<postgres_username>:<postgres_password>@localhost:5432/identity-reconciliation?schema=public"
DATABASE_URL="postgresql://<postgres_username>:<postgres_password>@localhost:5432/identity-reconciliation?schema=public"
Replace the postgres_username
with the actual username. Same with the postgres_password
param in the url
- Run
netlify dev
. You will receive the localhost run-time to test out the functions. Further testing of the endpoints can be done using Postman or the browser
This endpoint is to reset the database and seed the json payload that is shown here
This endpoint is to reset the database and seed the json payload that is shown here