Closed ojsimon closed 4 years ago
It tries to reach the corona-tracker-api, but you don’t have one running locally at port 5000, hence the error. Simply follow the installation process of the API if you want one running locally.
The numbers are up-to-date with JHU’s cvs timeseries files. It’s simply our data-source that’s a bit behind, nothing to do with the API.
Does it have to be running locally? Is it not possible to just link to the hosted version of the API at https://coronavirus-tracker-api.herokuapp.com/v2/locations ? Do I have to create another instance of it at Heroku?
Thanks
@ojsimon Yes, that is possible, you can change the URL in config/enviroment.js. Make sure to also start your app through ember serve
and not npm start
then to run without --proxy
.
@ExpDev07 I tried that, but after ember serve
got an error for the tracker section.
So if I want to push to Github pages, basically I should clone to a new repo. Then I should run NPM install
In the directory of the new repo. Then npm run deploy
after that git commit
to the new github repo.
Is that correct?
Because when I do that the page loads blank https://ojsimon.github.io/COTAPO/
Any suggestions?
Thanks
You need to set your GH-pages to point to the newly created branch which holds the dist files.
@ExpDev07 it is currently pointed at gh-pages branch (which I guess has the dist files)?.
No, your site shows the README file. How does your gh-pages branch look like
@ExpDev07 I had just changed it to master branch. I have changed back to gh-pages branch and it is blank.
What do you suggest?
Open console. Any errors?
@ExpDev07 No errors from deployment in console. I just tried all the steps again with a new cloned repo and still getting the same blank page issue. https://ojsimon.github.io/tra/
I also tried adding "homepage": "https://ojsimon.github.io/tra/", to the package.json file.
Any other ideas as to what is causing this?
Yup, right, if you view source, you see that it's trying to retrieve the javscript from
<script src="/coronavirus-tracker/assets/vendor-4a26dd7ea8ff785965ad9fc6fe8cf27e.js"></script>
<script src="/coronavirus-tracker/assets/coronavirus-tracker-0aadc30bc2368a84b02b07a62149764c.js"></script>
However, you need it to retrieve from /tra/...
, not /coronavirus-tracker/...
. Simply go into config/enviroment.js
and change modulePrefix
to tra
or you can go down to where it says
if (eviroment === 'production') {
// ENV.rootURL = ENV.modulePrefix + '/';
// change to:
ENV.rootURL = 'tra/';
}
Either way works, you should probably use the second option though and keep the modulePrefix
as coronavirus-tracker
. tra
doesn't really make much sense.
@ExpDev07 I did that the first method.
It still does not work though. Now the page is showing with a black background but nothing loads.
Thanks for your help.
Looks like you gotta do the second method. Change modulePrefix back to coronavirus-tracker
and just modify the root url to tra/
in production. Looks like changing modulePrefix has a lot more side effects.
Thanks that worked. Really appreciate your help here.
No problem :) I've been so busy with the API that the dashboard itself hasn't been updated since the beggining of v1 of the API aha, so it's using the old endpoints. Feel free to update it though.
Hi,
I am getting an error after NPM start.
How do I fix this?
Also the count of infected seems to be a bit behind other sources. How frequently does it update?
Thanks