2023-12-27 22:29:25 +00:00
|
|
|
=========
|
|
|
|
React App
|
|
|
|
=========
|
|
|
|
|
|
|
|
In order to use the scraped data a *react app* was developed.
|
|
|
|
The main thing this app does is show a map, with icons for each house, while also showing the distance and travel time:
|
|
|
|
|
|
|
|
.. figure:: react_app_example.png
|
|
|
|
|
|
|
|
|
|
|
|
Usage
|
|
|
|
=====
|
|
|
|
Copy the generated *out.json* file that was generated in the *usse scrape* project to ``src/locations.json``, next you can run the app:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
npm run start
|
|
|
|
|
|
|
|
This should start a server running the app.
|
|
|
|
|
|
|
|
Docker
|
|
|
|
======
|
|
|
|
A dockerfile was created in order to serve the application on ``Wintergreen``.
|
|
|
|
To use the dockerfile you can simply use the bash script: ``use_docker.sh`` and run it to run the docker container:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2023-12-28 21:09:56 +00:00
|
|
|
./use_docker.sh
|
|
|
|
|
|
|
|
Several commands are supported:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
./use_docker.sh remove
|
|
|
|
./use_docker.sh recreate
|