This is my NestJS solution to the GAN Integrity backend coding challenge. Note that I also created a separate solution for Express, koa and bun.
I am not affiliated with GAN Integrity, I have never received a response from them regarding my submitted solution. I am just using the opportunity to try out different approaches solving the challenge.
- Run
npm i
. - Start the NestJS server, i.e. per
npm run start:server
. - In a separate terminal, run the challenge script
npm start
.
Swagger is set up and can be accessed on http://localhost:8080/api/ once running the server. Use the SECRET
from the .env
to authorize.
In addition to the solution, some basic tests are implemented. They may be executed per npm test
and npm run test:e2e
.
The script
index.js
uses a local api to perform various operations on a set of cities. Your task is to implement an api so that the script runs successfully all the way to the end.Run
npm install
andnpm run start
to start the script.Your api can load the required data from here.
In the distance calculations you can assume the earth is a perfect sphere and has a radius is 6371 km.
Once you are done, please provide us with a link to a git repo with your code, ready to run.
Source repository: https://github.com/gandevops/backend-code-challenge