0

We will be serving static javascript ES modules and looking for an all-in-one hosting platform that is easy to use.

  • It must provide CORS headers (ES modules enable CORS by default)
  • HTTP/2 support is mandatory
  • Ability to set very long caching headers (content never changes)
  • Mirrored all across the world for fast transfers with low latency.
  • Pushing a new version should be a simple oneliner.

1 Answer 1

1

Have you considered CDNjs.com:

  • It supports CORS headers, it is dedicated to JavaScript after all.
  • It supports HTTP/2 as well as SPDY.
  • The cache duration is 355 days, which is probably plenty long enough.
  • Cloudflare is used as the CDN, they provide it to cdnjs.org for free.

Adding your library is a bit more than a one-liner unfortunately as you need to submit a pull request to their GitHub repository. You will also need to have a certain popularity requirement:

For the new library request issue, please make sure it's not a personal project, we have a basic requirement for the popularity, like 200 stars on GitHub or 800 downloads/month on npm registry.

1
  • Thank you for the suggestion. This would be great for a popular library. Most of our packages are really only interesting within the organization, so it, unfortunately, doesn't fit my use case.
    – mikabytes
    Nov 14, 2019 at 4:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.