Code with Hugo

Node.js and JavaScript Guides

  • Home
  • Books
  • Node
  • Testing
  • JavaScript
  • More...
  • Search
  • About
  • Gear & Setup
Subscribe
#Sequelize #Express #javascript #node

Sequelize Data Types: a practical guide

DataTypes are core to the Sequelize 4 library. This is a practical and complete guide to make up for the sparse Sequelize official documentation on the subject. First of all, DataTypes contains both the types and generators for default values: eg. NOW, UUIDV1 and UUIDV4 are speci ...

  • Hugo Di Francesco
    Author
3 min read
#javascript #web development

Avoid null/undefined in JavaScript arrays

How to avoid TypeError: Cannot read property ___ of undefined using Array.filter(Boolean) tl;dr: Array.filter(Boolean) filters out falsy values (null, undefined, 0, false, '') and avoids Cannot read property of undefined errors. Table of contents: ...

  • Hugo Di Francesco
    Author
3 min read
#javascript #tip

JavaScript array type check - “is array” vs object in-depth

Detecting Array vs Object in JavaScript with examples tl;dr To detect if something is an Array in JavaScript, use Array.isArray(somethingObjectToCheck). This post is a quarter useful, quarter history lesson, half quirky JavaScript exploration. Table of contents: ...

  • Hugo Di Francesco
    Author
6 min read
#meta #seo #technical writing

Technical content workflow for “Code with Hugo”: static site, Paper, Medium, DEV and Buttondown

tl;dr: here are the tools used to power, build and publish codewithhugo.com: Dropbox Paper because it syncs desktop/mobile and outputs to markdown Unsplash for cover images Edited Markdown + images → Hugo static site generator Casper 2 (https://ghost.org default theme) for Hugo S ...

  • Hugo Di Francesco
    Author
6 min read
#javascript #vuejs #node

Post Frequency: from prototype to production with Vue + Node

If you want to ship, use the tools you know. — A lot of people Let’s apply that principle: I’m building Post Frequency/Accountable Blogging, I’m familiar with Vue and Node-based backends. Netlify makes frontend deployments trivial and I’ve settled on Dokku for ...

  • Hugo Di Francesco
    Author
5 min read
#javascript #meta #payment

Add a Vanilla JavaScript paywall to a Hugo site using checkoutpage.co

How I created the buying mechanism for the Sequelize ES6 Cheatsheet using checkoutpage.co and sprinkles of vanilla JavaScript. This strictly isn’t a paywall, it’s all client-side and doesn’t check much. In principle you can display the whole things using a bit of CSS ...

  • Hugo Di Francesco
    Author
11 min read
#node #javascript #meta #git

A simple JavaScript/Node coding setup on Mac OS X

Here’s how I get productive for JavaScript/Node on Mac OS. It includes iTerm2, zsh, Node, Visual Studio Code and some git commands. ...

  • Hugo Di Francesco
    Author
6 min read
#node #sequelize #git #cli #javascript

Progress and roadblocks: a journey into open-source

Enhancing generators for ES6 in the Sequelize CLI This is the story of my discovery of ES6-class style model definitions with Sequelize (see Using ES6 classes for Sequelize 4 models). The realisation that the current Sequelize CLI model generator didn’t support it (as is e ...

  • Hugo Di Francesco
    Author
6 min read
#deployment #netlify #meta #javascript

A tiny case study about migrating to Netlify when disaster strikes at GitHub, featuring Cloudflare

Last Monday (22 October 2018) GitHub was going 💥, and scheduled content on Code with Hugo wasn’t going live. For context, the blog’s setup is documented in “Switching the lights on: Hugo vs Hugo config files”. tl;dr (as is relevant to this post) Cloudflare DNS + CDN + proxying + ...

  • Hugo Di Francesco
    Author
4 min read
#micro #node #javascript #es6 #architecture

Simple, but not too simple: how using Zeit’s `micro` improves your Node applications

Leave the Express comfort zone to expand how you think about Node application architecture. tl;dr using a function composition model for building HTTP servers is awesome Functions as a Service are great but have some drawbacks micro has a similar, simple API to FaaS but doesn&rs ...

  • Hugo Di Francesco
    Author
7 min read
← Next Posts Page 10 of 14  Previous Posts →

Interested in Alpine.js?

Power up your debugging with the Alpine.js Devtools Extension for Chrome and Firefox. Trusted by over 15,000 developers (rated 4.5 ⭐️).

Install Now close
Code with Hugo
Latest Posts Github