Making a subset of Font Awesome Font Awesome is, well, awesome - but there's no getting away from the fact that if you only want a few of the icons then it's not a lightweight package.
Things I wish I knew about… JavaScript modules I have to confess it took me a while to get my head around JavaScript modules. This is at least partly because there are two different popular module systems, CommonJS [http://www.commonjs.org/] and ECMAScript 2015 [https://en.wikipedia.org/wiki/ECMAScript] (usually shortened to ES2015). The ECMAScript 2015
JavaScript pattern - the “singleton file” The other day I came across the solution to a number of problems I’d had in the past. I imagine it’s probably obvious to anyone who’s been doing JavaScript for a while, but since it took a while to dawn on me I thought I’d try
Live reload in Hapi Something I’ve been meaning to address for a while is the lack of a livereload [https://github.com/livereload/livereload-js] plugin for Hapi [https://hapi.dev/]. Template changes are visible on manual reload if you turn off caching, but I’ve become used to automatic reloading when developing with
Things I wish I knew about… JavaScript functions Especially coming from a C/Python/Elixir background, there were some things about JavaScript functions that I really didn’t get to start with.
Some testing with Axios Recently I’ve been working on integrating with a subscription/payment gateway. (It hasn’t been straightforward, but that’s a whole other post…) I wanted to be able to test my web-hook code without repeatedly triggering events from the gateway. I stored the incoming events in JSON format, which
Hapi: using pre-route functions for fun and profit I started to think - Express has middleware, I wonder what Hapi has? There’s bound to be something so I can ...
Checking if a user owns a domain The technique we’re using is the one used by Google, Microsoft and others to verify that you've got some authority over a domain.
How I made my tests faster Today I’ve been reminded of the importance of measuring first when debugging, rather than making assumptions.
GraphQL - first steps I was following Flavio Copes' tutorial [https://flaviocopes.com/graphql-node-express/] on creating a basic GraphQL server in Express the other day. The tutorial was good, but I realised at the end that it didn't give you an example of a query to actually see the resolvers in action. Luckily I've