Elm-0.18-packages : Search online for 0.18 packages

As a lot of us are still transitioning from Elm 0.18 or must maintain 0.18 applications, I made this basic web app to search for Elm 0.18 packages:

https://dmy.github.io/elm-0.18-packages/

Note that by default it displays all elm-lang packages.

The simple source code is new but the CSS is copied from the official package.elm-lang.org web site (thank you).

Feedback requested:

An important point is that the application is downloading the packages list from the official web site once during initialization, this has two consequences:

  1. As the package.elm-lang.org website does not allow CORS requests, I have to use a CORS proxy. For now I use a free heroku dyno with cors-anywhere but this slows down the initialization, is less stable, and I don’t know if this will be enough to handle more users (I already had to change from a public instance to a private one).
    Therefore if it is was possible to add a CORS rule on package.elm-lang.org to accept requests from dmy.github.io, it would be ideal as I could then remove the proxy. If this is not possible (because of technical or time/effort constraints) and if someone has a more powerful CORS proxy (or could host one), it would also help if the current solution does not scale well.

  2. As the package list is not cached by the application, it could lead to a bandwidth usage increase for the official package.elm-lang.org web site. It’s not much different from some CI builds, but if this causes issues, tell me and I will try to do something about it (I don’t want to use a backend but I could store the packages locally using indexedDB or something).

Any other feedback is of course welcome.

8 Likes

Thank you for making this site. Looks really useful!

How about embedding the JSON data in your app? I heard some projects use cron on CI and push new contents automatically. (It might cause synchronization problem though.)

1 Like

Sure, I could push an updated json periodically to the repo. But

  1. It would be annoying for those that use the page to check packages they just published.

  2. It’s not worth the trouble until we have bandwidth issues.

So I guess we will see. For now it seems ok.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.