Comments (13)
@styfle I think @sagarkarira refers to using curl https://corona-stats.online/
as opposed to running it locally like curl locahost:3001
from coronavirus-tracker-cli.
Oh I understand now.
Try setting FORCE_COLOR=1
to force chalk to set colors even without TTY.
from coronavirus-tracker-cli.
@styfle It worked. ❤️
I've also integrated my repo with Zeit.
Check here: curl https://coronavirus-tracker.sagark.now.sh
Merging this PR.
from coronavirus-tracker-cli.
@sagarkarira I highly recommend the Git Integration because then ZEIT Now will deploy each PR and you can try out the preview url before merging. Merging to master will perform the production deployment and assign the appropriate domain.
https://twitter.com/rauchg/status/1240031831090532353
from coronavirus-tracker-cli.
@styfle: do you have any ideas maybe? :)
from coronavirus-tracker-cli.
Correct, when you visit deployment.now.sh/_logs
the logs don't include colors.
You might want to try Log Drains if you need more advanced logging https://zeit.co/blog/log-drains
from coronavirus-tracker-cli.
I created PR #51 but you don't have this repo linked so it didn't autodeploy my PR.
Can you try signing up https://zeit.co/github
from coronavirus-tracker-cli.
@styfle I didn't know about Zeit Git integration. This is awesome.
from coronavirus-tracker-cli.
BTW do you have any idea why the slowdown? This wasn't present a couple of says ago @sagarkarira https://gtmetrix.com/compare/G9zeIBok/INyNUd35#waterfall
from coronavirus-tracker-cli.
Maybe it's because of the API I am using to fetch the data. I have added node-cache around the response, but I don't really know that Zeit allows variable caching as it is serverless.
The caching works locally but I haven't added logs to test in zeit dev or prod. I thought it would work. If the request is going to that API on each call then the response will be slow.
Also, I have removed Zeit smart CDN caching because there was a bug which was returning HTML is case of curl request.
But changing the Cache-Control
to no-cache
didn't solve it.
The issue was with the regex which was pushed sometime earlier. Check here. I've removed the global flag and will push the code now.
from coronavirus-tracker-cli.
I will check if variable caching works on zeit by adding some logs and will let you know
from coronavirus-tracker-cli.
I'm not familiar with this, I'm not sure how to solve it, but we should have CDN and caching for sure as you can see :/
from coronavirus-tracker-cli.
You should add s-maxage
if you want to take advantage of the Smart CDN.
https://zeit.co/docs/v2/network/caching
from coronavirus-tracker-cli.
Related Issues (20)
- country directory not installed using npm package
- The worldstats entry is no longer valid since World stats are added in the main list. HOT 1
- Request to add recoverd to https://corona-stats.online/states/us
- Feature request: Sort by cases per million
- Can't access to site: result.data.reduce is not a function HOT 1
- Getting an error when I try to run "corona"
- The tracker is down HOT 1
- [Feature request]way to remove the footer.
- data massively wrong HOT 3
- What happened to https://corona-stats.online/updates ? HOT 2
- Should add yesterday data
- vaccinated possible? HOT 1
- Adding a "Used In/By: " in the readme
- 7-day-incidence values
- Switch for sort by field
- Site is down HOT 2
- API for Poland
- Framework issue
- [Bug] HTTP status code 502 HOT 4
- SSL error on source
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from coronavirus-tracker-cli.