Giter Club home page Giter Club logo

Comments (13)

XhmikosR avatar XhmikosR commented on June 26, 2024 1

@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.

styfle avatar styfle commented on June 26, 2024 1

Oh I understand now.

Try setting FORCE_COLOR=1 to force chalk to set colors even without TTY.

from coronavirus-tracker-cli.

sagarkarira avatar sagarkarira commented on June 26, 2024 1

@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.

styfle avatar styfle commented on June 26, 2024 1

@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.

XhmikosR avatar XhmikosR commented on June 26, 2024

@styfle: do you have any ideas maybe? :)

from coronavirus-tracker-cli.

styfle avatar styfle commented on June 26, 2024

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.

styfle avatar styfle commented on June 26, 2024

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.

sagarkarira avatar sagarkarira commented on June 26, 2024

@styfle I didn't know about Zeit Git integration. This is awesome.

from coronavirus-tracker-cli.

XhmikosR avatar XhmikosR commented on June 26, 2024

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.

sagarkarira avatar sagarkarira commented on June 26, 2024

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.

sagarkarira avatar sagarkarira commented on June 26, 2024

I will check if variable caching works on zeit by adding some logs and will let you know

from coronavirus-tracker-cli.

XhmikosR avatar XhmikosR commented on June 26, 2024

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.

styfle avatar styfle commented on June 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.