Code with Hugo

Node.js and JavaScript Guides

  • Home
  • Books
  • Node
  • Testing
  • JavaScript
  • More...
  • Search
  • About
  • Gear & Setup
Subscribe
#bash #deployment #ci #tooling

Bash Cheatsheet: check if environment variables are set or file/symlinks exists + more

A bash scripting cheat sheet for developers who just want to get by. Writing setup, CI and deployment flows means a bit of the old bash scripting. Despite my deep interest in the intricacies of Bash (/sarcasm), I’ve kept hitting up Google and StackOverflow for solutions to ...

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

Async JavaScript: history, patterns and gotchas

A look at the history, patterns and gotchas of asynchronous operations in JavaScript. We’ll go through the pros and cons of callbacks, Promises and async/await. Present some pitfalls to bear in mind as well as introducing how you would deal with certain situations. Live-cod ...

  • Hugo Di Francesco
    Author
16 min read
#deployment #dokku #MongoDB

Connect to MongoDB on Dokku with your local command line or Robo3T

The Dokku mongo plugin provides a mongo:connect command, which opens a tunnelled connection to you MongoDB instance on Dokku. This is how you can connect to your database using the tool of your choice, the examples will be using Robo3T. Table of Contents: ...

  • Hugo Di Francesco
    Author
3 min read
#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
← Next Posts Page 10 of 15  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