Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to change maps and automatically update the website each 10mins on live server. #5

Closed
aaron2181 opened this issue Mar 25, 2020 · 3 comments

Comments

@aaron2181
Copy link

Hello Denven, how do I change the maps and also automate updates each 10mins as you did on live server?
Thanks

@denven
Copy link
Owner

denven commented Mar 25, 2020

Hi, Aaron

It depends ON how to run or deploy the site.
I deploy it ON AWS EC2, so I start a crontab task in bash Shell to run the scripts in /script directory to update data
if you deploy it by github action, you can use workflows to do the same thing.

If you want to use new maps, you need get the geo json file of the country/place, search echarts-countries from github.

@aaron2181
Copy link
Author

aaron2181 commented Mar 25, 2020

Thanks, Deven

I only want to change Canada to Ghana and the news section to be centered on Africa.
I am new to geo json your help or guidelines would be highly appreciated.

@denven
Copy link
Owner

denven commented Mar 26, 2020

Thanks, Deven

I only want to change Canada to Ghana and the news section to be centered on Africa.
I am new to geo json your help or guidelines would be highly appreciated.
For replace a new map:
What you need to do before deployment:
1、download https://raw.githubusercontent.com/pissang/starbucks/gh-pages/json/Ghana.json and put it into public/assets/
2、take a look at the code and add new component for your map, modify related code such as router/link etc.
3、Find data source from wiki or CDC of your country, write your own scraper script (take a look at the scripts in /scripts directory, or emplement a seperate backend.
4、read and pass the data to your component, Overall.js etc.

For fetching news from your country, check api: get your own API key

@denven denven closed this as completed Mar 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants