Using Docker (needs to be installed) or Node (8+ needs to be installed)
- Run
docker-compose up
in terminal - Open
localhost:3000
in browser
Both server and client needs to be running. Prerequisite: Node (8+) installed
In a terminal window:
cd server
npm install
npm run build
npm run start
Keep terminal open.
In new terminal window
cd client
npm install
npm run start
- Open
localhost:3000
in browser
Using a React client for a small coding task like this might be an overkill.
But it would make more sense in production, because of the virtual DOM (good performance with updating long lists),
and using the same test runner (Jest comes bundled with create-react-app
) makes the testing easier.
- add validation to next page query (now I just validate if they are there, but assume the client uses the returned query data)
- add tests for React client
- using an external library for geo logic (distance, etc)
- using
BigInt
or other packages to handle big numbers and floating point precision problems in JS - or using another language (Python?)
- or just using Geospatial query with Cloudant