Submit a source and a destination address and get the distance in kilometers between them.
This app was implemented using Nest framework and it was deployed on Deta Cloud;
It is connected to a MongoDb database hosted on MongoDB Atlas.
This project uses Docker and docker-compose for local development.
If you are running it for the first time, run in the project root:
$ docker-compose up --build
If not, just run:
$ docker-compose up
The app will be available on localhost:3000.
In order to search for the distance between two addresses, fill the form and sumbit.
The result will appear on a dialog box.
In order to get historical queries, access /search
, for example localhost:3000/search
PS: Only queries with both source and destination addresses are stored. Queries that had both addresses but no distance calculated are stored without a distance value.
With the container running, run in another terminal window:
$ docker-compose exec app npm run test