Upgrading Phoenix to Http2

Upgrading phoenix framework to serve http2 Http2 is the next version of the http protocol and offers several advantages. It serves over a single connection, reducing the number of roundtrips necessary. With multiplexing it can handle multiple requests at the same time and as a whole is just better. As the internet slowly moves to support http2, Phoenix does not lag behind. The webserver Phoenix uses, Cowboy, has released version 2 with support for http2 and the updates to Phoenix and Plug have followed in its path. »

Using Elm within VueJS

Using Elm within VueJS Lately I have been using VueJS a lot. It’s an easy framework to learn and gets results quickly. There is an optional Typescript package to get some much needed typesafety. Overall, I’m pretty happy with it. However, the templates in Vue are where the typesafety breaks down. Typescript just has no way of knowing what’s happening in there, whereas it does have support for JSX/TXS and will supply you with type information in e. »

Early look at Rails ActiveStorage

I took an early peek at the new Active Storage project in Rails 5.2. It is a built-in solution to handling uploads, something that is all to common in web applications. Also something that is covered by quite a few gems, CarrierWave, PaperClip and Refile for example. These are just the ones I know off the top of my head. At times I have also handled uploads without gems, it’s not that difficult and didn’t warrant the inclusion of another gem for those projects. »

Uploading to Google Cloud Storage using Arc and Phoenix

In this post I will demonstrate how to upload to Google Cloud Storage using Arc and Arc.Ecto in Phoenix. There are several examples on how to use Arc in combination with S3 or local file uploads but the GCS integration is a bit more unknown. I assume you have an up to date elixir installation and know your way around Phoenix and GCS. mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez mix phx.new web --no-brunch Follow instructions to configure your postgres credentials in config/dev. »

Dynamic image resizing with Google Cloud Functions

For a small project I needed dynamic image resizing, meaning I would call an image in an url, append some parameters for resizing and return a smaller image, so something like example.com/image.jpg?w=50&h=50. Now there are several open source projects capable of doing that, most notably Thumbor. However, I wanted to try something new. I recently dabbled a little with Google Cloud Functions and it seemed like a good candidate. However, I feared the initial spin-up time of the functions might be problematic. »

Upgrade js dependencies with yarn

A quick trick to upgrade the javascript dependencies in your project. Use the command $ yarn upgrade-interactive It will show you an interface to select the packages you want to upgrade. The packages listed in red would be upgraded when you would execute the $ yarn upgrade command. Yellow packages are semver incompatible, meaning that they may be incompatible with your code. Extra caution is needed when upgrading those. You can use space to select the packages, press enter to install them. »

Adding Elm to a Rails 5.1 application

Note: Webpacker update Although this tutorial will still work it has been superseded by the addition of Elm to the webpacker gem. See this commit and the entry in the README. The end result is nearly the same. Adding Elm to a Rails 5.1 application The release of Rails 5.1 (http://weblog.rubyonrails.org/2017/4/27/Rails-5-1-final/)has brought some interesting changes for frontend development. Most notably is that it comes with yarn, a tool to manage your javascript dependencies from NPM. »