electricitymaps / electricitymaps-contrib

The open source repository for Electricity Maps App and data parser that enables a real-time visualisation of the CO2 emissions of electricity consumption
https://app.electricitymaps.com
GNU Affero General Public License v3.0
3.59k stars 946 forks source link

[Wiki] Small setup documentation step missing #5153

Closed aliciacatalina closed 1 year ago

aliciacatalina commented 1 year ago

Description

I was following the steps to setup the application here: https://github.com/electricitymaps/electricitymaps-contrib/wiki/Set-up-local-environment, everything is greatly documented, I only ran into a small issue when trying to paint the map on this step: https://github.com/electricitymaps/electricitymaps-contrib/wiki/Set-up-local-environment#running-the-frontend-map Nothing fails on the server logs, but the client is getting a 404 when calling for the data:

Screenshot 2023-03-04 at 21 10 01

I was just missing to run node generate_mock_data.js inside mockserver/ so I think it would be useful to be in the docs. I can update them, but want to know if it makes sense. Thanks!

VIKTORVAV99 commented 1 year ago

Hi @aliciacatalina! While not documented in the wiki this is documented in the README.md inside the mockserver folder where it states the following:

Generate new mock data

(eMap team only): Assuming you have the app-backend running. Run the following:

node generate_mock_data.js

This will fill in the v5 mock data.

So there is currently no way for community contributors to update this data. With that said the map should color corectly with just running pnpm run start in the mockserver folder (and soon it will work with pnpm run mockserver in the web folder as well when #5082 is merged.

VIKTORVAV99 commented 1 year ago

Closing this down as there is no response and this behavior is intentional.