Giter Site home page Giter Site logo

sharemeowclient's Issues

What's the recommended way to pre-generate an image when using a CDN?

Generating images on-the-fly is great, but can be a little bit slow at times. Using a CDN helps, but not for the initial request.

Is there a recommended way to 'ping' the ShareMeow app through the CDN (e.g. a simple GET request) so it starts generating the image and can be loaded from the CDN cache the next request?

A simple open(url) would work, but for large images it seems wasteful waiting for the full response.

Setting config to nil produces cryptic error message

When setting the config variables to nil you'll receive the following error when calling .image_url:

!! #<TypeError: no implicit conversion of nil into String>

I ran into this problem, because I'm using ENV variables in my initializer and accidentally forgot to set a value. This results in the ShareMeow config variables being set no nil, overriding the defaults and .image_url producing the cryptic error above.

Fortunately there's a limited codebase here so debugging this is rather painless, but I still think a more descriptive error message when calling .image_url or using nil as a configuration value would be handy.

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.