This is my solution to the GAN Integrity backend coding challenge. The solution is implemented per three different servers:
- Bun (using Bun runtime environment)
- Express (using Node.js runtime environment)
- koa (using Node.js runtime environment)
- Run
npm install
. - Compile and start up the server, by executing either:
npm run deploy:bun
,npm run deploy:express
, ornpm run deploy:koa
. - In a separate terminal, run the challenge script
npm start
.
In addition to the solution, some basic tests are implemented. They may be executed all at once per npm test
. The Bun tests use the Bun test runner, while the Express and koa tests use the Jest test framework.
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