usse/documentation/source/app.rst

54 lines
1.3 KiB
ReStructuredText
Raw Permalink Normal View History

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
2024-04-01 14:50:30 +00:00
The app works using the generated out.json file from the scrape project. This file is compiled in the app. This makes the loading of the App quite slow.
Also a lot of markers has some impact on the performance of the app.
2023-12-27 22:29:25 +00:00
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
2024-04-01 14:50:30 +00:00
./use_docker.sh rebuild
Redeploy
--------
To recreate the app you can run:
.. code-block:: bash
./use_docker.sh recreate
filters
-------
The app also has filters for price and distance to various locations:
.. figure:: images/react_filter.png