6 months of Code with Hugo can only mean more JavaScript
6 months of Code with Hugo can only mean more JavaScript - issue 15
This newsletter is the first after the 6-month mark of me writing at Code with Hugo.
In celebration of this, I’m finally getting rid of the default (H) favicon and replacing it with what the readers decide: Twitter poll: What should the Code with Hugo Favicon be?.
#JavaScript
Writing modern, high quality JavaScript is something that there is remarkably little content on. For every “here’s how you can improve your JavaScript drastically post”, there are 5-10 “here’s how to write the same todo app you’ve written in every framework, using this framework”.
1. Use ES modules in Node without Babel/Webpack using esm
A write-up of the not uncommon use-case of trying to incrementally adopt ES modules in a Node application code base. esm
allows you to write ES modules today, with only it as a runtime dependency (no compilation/transpilation step). The common use-case of “write everything as an ES module” is in the docs. This describes how to use the module to manually import ES modules from CommonJS.
2. Simple, but not too simple: how using micro
improves your Node applications
An ode to Functions as a Service and micro
a simple library for writing HTTP (micro)services with a model based on function composition.
Express is stable and mature, but it does have drawbacks (namely, callbacks and sometimes implicit use of middleware). After writing a prototype for Post Frequency using Netlify lambda, a Function as a Service (FaaS) offering, micro
felt like a more natural choice.
micro
‘s simplicity helped me reconsider what I knew about building backend services and have a clearer mental model for the future 🙂.
#Meta
1. 6 months of Code with Hugo in numbers
Sharing the love Code with Hugo has been getting over the past 6 months. This will be a monthly #openstartup thing (althought it’s not really a startup yet), and I’m working on an /open
page (it’s pretty low on the todo list but will get done eventually).
Click here for the associated Twitter thread
2. Switching the lights on: Hugo vs Hugo config files
How Code with Hugo is set up. Wrangling Hugo configs… It’s a bit out of date but an update is “coming soon”™️.
Links and #wins
1. Netlify zip deploy
and CloudFlare proxied CDN
This saved me during the GitHub outage which meant my GitHub Pages site (codewithhugo.com), stopped building… which means How using micro
improves your Node applications was not being published.
Netlify really is a great platform 👍.
2. Post Frequency is ready to get shared with the world
Go to accountableblogging.com/post-frequency to subscribe.
3. Netlify lambdas and serverless
As mentioned in my post about micro
and how it improves your Node architecture, I spent some time playing around with Netlify lambdas.
I didn’t run into cold start issues (post by Mikhail Shilkov). It was good for a quick prototype and was fun while it lasted but I quickly went back to hosting on my Dokku server when I hit bundling issues (more about that here).
4. Rethinking JavaScript Test coverage, by Benjamin Code at npm