Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 1.5 KB

README.md

File metadata and controls

36 lines (24 loc) · 1.5 KB

GAN Integrity backend code challenge (NestJS solution)

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.

Solution instructions

  1. Run npm i.
  2. Start the NestJS server, i.e. per npm run start:server.
  3. In a separate terminal, run the challenge script npm start.

Swagger

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.

Tests

In addition to the solution, some basic tests are implemented. They may be executed per npm test and npm run test:e2e.

Original instructions

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 and npm 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