This is the example of how to make EventSource with Flask for long-running task. I simulate the long-running task which calculates the position to put a marker on the map.
- You need to have MAPBOX ACCESS_KEY
export MAPBOX_ACCESSKEY=<your access key>
- Then run the server
python server.py