Makzan / I share what I learned

Migrating from Ruby on Rails to static hosting

I often need to have a quick QR code generation from URLs. Really quick. For example, when I am teaching mobile web class, I demonstrate the code and put the QR code up on screen for students to scan into their mobile phones for testing.

That’s why I had written a tiny tool named I can append any URL to it. For example, when I was in, I can simply prepend the tool URL into to generate the QRCode for that.

Previously I used Ruby on Rails to implement this tool. It was overkilled. Earlier this year, I rewrite the tool into static HTML and hosted on Netlify.

I need to route everything into the index.html for the JavaScript based QR code generation. The _redirect feature in Netlify can facilitate this requirement.

In my _redirect file, I route every URL to index.html.

/* /index.html 200

That is how I migrated the into static hosting.

Published on 2019-04-05. More articles like this:
- Projects

Previous <- Why I keep switching editor when iA writer + Working Copy fulfill my writing needs?
Next -> Setting header and footer for DocRaptor and PrinceXML PDF generation