Code with Hugo: JS & Node.js in Prod logo

Code with Hugo: JS & Node.js in Prod

Subscribe
Archives
Add Diagrams to your blog posts with Mermaid JS - Code with Hugo - August 13th 2019
August 13, 2019
Hot off the press Add Diagrams to your Jekyll/Hugo/Gatsby blog with Mermaid JS: The following post will go through how to integrate Mermaid JS, a “simple...
Monorepos with Yarn Workspaces - Code with Hugo - Aug 6th 2019
August 6, 2019
Hot off the press Yarn Workspaces: monorepo management without Lerna for applications and coding examples: How to use Yarn Workspaces to manage...
Mocking Full and Partial Imports with Jest - Code with Hugo - Jul 30th 2019
July 30, 2019
Hot off the press Jest Full and Partial Mock/Spy of CommonJS and ES6 Module Imports: The example repository is available at github.com/HugoDF/mock-spy-...
Jest .toHaveBeenCalled Assertions - Code with Hugo - Jul 23rd 2019
July 23, 2019
Hot off the press Jest assert over single or specific argument/parameters with .toHaveBeenCalledWith and expect.anything(): With Jest it’s possible to assert...
Mocking CommonJS/ESM Imports with Jest - Code with Hugo - Jul 16th 2019
July 16, 2019
Hot off the press github.com/HugoDF/mock-spy-module-import - (Work in Progress) JavaScript import/require module testing do's and don'ts with Jest If you...
Search With Lunr - Code with Hugo - Jul 2nd 2019
July 2, 2019
Hot off the press Add Search to a Hugo site with Lunr.js and Node.js: Hugo “The world’s fastest framework for building websites” is a great option for...
JavaScript Type Check Guide - Code with Hugo - Jun 25th 2019
June 25, 2019
Hot off the press JavaScript Data Type Check Cheatsheet: Common JavaScript data type checks, pitfalls and idiomatic workarounds. If you missed it Avoiding...
Tailwind CSS First Impressions and Cli Setup - Code with Hugo - Jun 18th 2019
June 18, 2019
Hot off the press Tailwind CSS 1.x impressions, development and production setup for static sites with Tailwind CLI and PurgeCSS CLI: Tailwind CSS is “a...
Jest Exclude Files Functions Statements - Code with Hugo - Jun 11th 2019
June 11, 2019
Hot off the press Jest exclude file/function/statement from test coverage: In computer science, test coverage is a measure used to describe the degree to...
Netlify Lambda Pocket Integration - Code with Hugo - Jun 4th 2019
June 4, 2019
Hot off the press Super-powered newsletter content with Pocket and Netlify Lambda: An example Netlify Lambda to fetch all “newsletter” posts from Pocket. The...
Date.now Mocking in Jest - Code with Hugo - May 28th 2019
May 28, 2019
Hot off the press Mocking/stubbing the current Date in Jest tests: How to mock accessing the current date in Jest. I’ve been adding a few more Netlify...
JS Recursion in Production - Code with Hugo - May 20th 2019
May 20, 2019
Recursion in JavaScript has a special place in my career as a developer and as a content creator. Recursion is a very powerful tool that can solve seemingly...
Express.js Tricks Extended - Code with Hugo - May 13th 2019
May 13, 2019
An update to the Express built-in body-parsing middleware post to fix my misinterpretations, add some structure and show how to parse urlencoded bodies. Hot...
Assert over specific mock call parameters with Jest - Code with Hugo - Apr 29th 2019
April 29, 2019
Hot off the press Jest assert over single or specific argument/parameters with .toHaveBeenCalledWith and expect.anything(): With Jest it’s possible to assert...
Node.js REST API Setup with Express, Postgres and Docker - Code with Hugo - Apr 24th 2019
April 24, 2019
Happy Easter-delayed newsletter 🐣 Hot off the press An enterprise-style Node.js REST API setup with Docker Compose, Express and Postgres: The why and how of...
Add Days to a JS Date - Code with Hugo - Apr 15th 2019
April 15, 2019
Hot off the press Add days to a JavaScript Date: Despite the JavaScript Date warts, it’s straightforward to add days to a date in JavaScript. Here's a post...
Auto publish your scheduled blog posts on JAMstack + Netlify - Code with Hugo - Apr 8th 2019
April 8, 2019
Hot off the press Auto-publish future posts with JAMstack on Netlify and CircleCI 2.0 scheduled jobs: Static site generators like Hugo, Jekyll, Hexo, Gatsby...
Enable your CDN on Netlify - Code with Hugo - Apr 1st 2019
April 1, 2019
Hot off the press Enable CDN (Cloudflare) caching for your Netlify site: Netlify likes it when you use their CDN, but if you’ve got Cloudflare in front, you...
Local HTTPS with Docker - Code with Hugo - Mar 25th 2019
March 25, 2019
This week is Local HTTPS, why and how (Docker) edition. Hot off the press The post: Docker Compose Local HTTPS with nginx or Caddy The GitHub repo for local...
Create mock object instances in JavaScript using Object.defineProperty - Code with Hugo - Mar 18th 2019
March 18, 2019
Hot off the press JavaScript Object.defineProperty for a function: create mock object instances in Jest or AVA - how to use Object.defineProperty with...
Fix git "failed to push, updates were rejected" - Code with Hugo - Mar 9th 2019
March 11, 2019
Hot off the press Fix git “tip of your current branch is behind its remote counterpart”: explanation of why git rejects pushes and how to fix it under...
Pass cookies with axios or fetch requests - Code with Hugo - Mar 4th 2019
March 4, 2019
Hot off the press Pass cookies with axios or fetch requests: When sending requests from client-side JavaScript, by default cookies are not passed, here's how...
Express body-parsing with no dependencies - Code with Hugo - Feb 25th 2019
February 25, 2019
Hot off the press Parse POST/PATCH/PUT request JSON body with Express and no dependencies: I discovered that Express 4.16+ had a built-in JSON body-parser...
Mock Express request and response - Code with Hugo - Feb 18th 2019
February 18, 2019
Hot off the press A guide to Express request and response mocking/stubbing with Jest or sinon: how to test Express handlers and middleware by calling them up...
Configuration management in Node.js apps - Code with Hugo - Feb 14th 2019
February 14, 2019
Hot off the press Node.js config management done right and my issues with the config npm package in the context of trying to keep your application 12-factor:...
Integrate Python/Ruby/PHP/shell with Node.js - Code with Hugo - Feb 4th 2019
February 4, 2019
Hot off the press More JavaScript shenanigans this week: The comprehensive guide to integrating a Python/Ruby/PHP/shell script from Node.js using...
Async JavaScript, history, patterns and gotchas - Code with Hugo - 28th Jan 2019
January 28, 2019
I've been preparing a presentation that I'll be giving tonight at Codebar London, "Async JavaScript: history, patterns and gotchas"....
Dokku and deployment - Code with Hugo - 21st Jan 2019
January 21, 2019
Since I've been writing a lot more backend JavaScript recently, I'll be publishing more around JS patterns, asynchronous behaviour etc, that are semi-obvious...
Sequelize DataTypes and JS fundamentals - Code with Hugo - 24th December 2018
December 24, 2018
Sequelize DataTypes and JS fundamentals - Code with Hugo - 24th December 2018 As the year is winding down, I've decided that I'm moving back to a weekly...
Workflows and JavaScript deep-dive - Code with Hugo - 10th December 2018
December 10, 2018
Workflows and JavaScript deep-dive I just figured out that I can auto-embed posts' images using just their URL 💪so posts are going to be more colourful now 🙂...
My goto stack from prototype to launch - Code with Hugo - 26th November 2018
November 26, 2018
My goto stack from prototype to launch In recent weeks I've launched/made first sales of the Sequelize ES6 cheatsheet, started a new role and looked at...
Sequelize ES6 Cheatsheet is live - Code with Hugo - 12th Nov 2018
November 12, 2018
Sequelize ES6 Cheatsheet is live - Code with Hugo Big day for some of you can access the Sequelize ES6 cheatsheet (RRP $1.99) at...
6 months of Code with Hugo can only mean more JavaScript
October 22, 2018
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...
JavaScript, deployment and prototyping - Code with Hugo 14
October 8, 2018
JavaScript, deployment and prototyping - Code with Hugo #JavaScript basics New and old posts to get gain some confidence in JavaScript. The following are all...
ORMs and deployments - Code with Hugo 13
September 24, 2018
Writing modern #Sequelize Sequelize is a popular and stable ORM for Node. The downsides to this stability and age is that its syntax and docs are a bit...
Code with Hugo - Newsletter 12 - GraphQL, Git and JavaScript Tooling
September 10, 2018
Code with Hugo - Newsletter 12 - GraphQL, Git and JavaScript Tooling Code with Hugo newsletter is moving to a more newsletter-y format. From now on, it’s...
Code with Hugo: A gentle introduction to GraphQL
September 3, 2018
A gentle introduction to GraphQL API integrations GraphQL is a great alternative to REST (or other HTTP API designs). This is an quick introduction to the...
Code with Hugo: consuming GraphQL from JavaScript, 0-config deployments with GitHub Pages and Parcel
August 27, 2018
An intro to consuming GraphQL from JavaScript and 0-config deployments using GitHub Pages and Parcel This week continues with GraphQL, this time in...
Code with Hugo: Another week, not another rant.
August 20, 2018
Another week, not another rant. There should be something for everyone here: - a bit of housekeeping on Cloudflare - changing the date of a commit for...
Switching the lights on: Hugo vs Hugo config files
August 13, 2018
Switching the lights on: Hugo vs Hugo config files A simple Hugo blog setup The story of getting codewithhugo.com up and running. The tl;dr is the following:...
Code with Hugo: abusing Jest snapshot tests, some nice use-cases
August 6, 2018
Abusing Jest snapshot tests: some nice use-cases 📸 There's some nice use-cases for snapshot tests outside of the well-travelled React/Vue UI component ones....
Code with Hugo: Deploy to multiple environments with git and CircleCI
July 30, 2018
Deploy to multiple environments with git and CircleCI Easily deploying to multiple environments in a simple manner using GitHub, CircleCI and Heroku....
Code with Hugo: setup, CI and deployment tips & tricks
July 23, 2018
Installing redis-cli latest by itself and some bash-ing Writing setup, CI and deployment flows means a bit of the old bash scripting and weirdness with...
Code with Hugo: Bring Redux to your queue logic: an Express setup with ES6 and bull queue
July 18, 2018
Bring Redux to your queue logic: an Express setup with ES6 and bull queue There always comes a point in a web application's life where an operation is best...
Code with Hugo: ES6 by example: a module/CLI to wait for Postgres
July 9, 2018
ES6 by example: a module/CLI to wait for Postgres When using docker-compose, it’s good practice to make anything that relies on Postgres wait for it to be up...
Code with Hugo: Polls, dates, types and styles
July 2, 2018
Polls, dates, types and styles This week’s edition is a compilation of shorter tips and tricks: how to do HTTP polling with RxJS 5 mocking Date.now in Jest...
Code with Hugo: Testing an Express app with SuperTest, moxios and Jest
June 25, 2018
Testing an Express app with SuperTest, moxios and Jest Testing is a crucial part of the software development process. It helps to catch bugs, avoid...
This email brought to you by Buttondown, the easiest way to start and grow your newsletter.