Code with Hugo

  • Home
  • Categories
  • guides
  • #AMA
  • JavaScript
  • Node
  • #open
Subscribe
#JavaScript #VueJS #web development

Writing multiple Vue components in a single file

Writing multiple components in one file is a pattern from React where some files contain multiple components. Some of those components are “private” to the file/exported component since no other component needs to consume them. ...

  • Hugo Di Francesco
    Author
4 min read
#JavaScript #Sequelize #testing #Node

Mocking/stubbing ES6 classes in tests with examples of Sequelize model unit tests

This post goes through some patterns that can be used to unit test ES6 classes. The examples will use Jest module auto-mocking but should be portable to other module mocking libraries (eg. Proxyquire) with some modifications. In “Using ES6 classes for Sequelize 4 models&rdq ...

  • Hugo Di Francesco
    Author
2 min read
#JavaScript #Node #ES6

Why you should wrap your (JavaScript) dependencies

An email sending example. ...

  • Hugo Di Francesco
    Author
2 min read
#graphql #tooling #web development

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 core concepts around consuming a GraphQL API. To see some examples consuming a GraphQL API: In Python, see Python GraphQL client requests example using gql In JavaScript (bro ...

  • Hugo Di Francesco
    Author
5 min read
#JavaScript #graphql #Node #web development

JavaScript GraphQL client requests in Node and the browser using `graphql.js`

An example consuming a GraphQL API in JavaScript from Node and the browser using graphql.js See the example live: https://codewithhugo.com/js-graphql-client-example/. Full repo: https://github.com/HugoDF/js-graphql-client-example. ...

  • Hugo Di Francesco
    Author
3 min read
#JavaScript #deployment #Node #tooling

Build and deploy a Vue/React/Vanilla JS app with Parcel and GitHub pages

Parcel allows us to bundle frontend applications with no configuration and GitHub pages affords us a way to deploy them for free. Here’s how to use these two tools together to deploy a JavaScript application. Full example of a repo deployed like this: https://github.com/Hug ...

  • Hugo Di Francesco
    Author
2 min read
#git #bash #productivity

Change the date of a git commit

One of the greatest and worst things with git is that you can rewrite the history. Here’s a sneaky way of abusing that, I can’t think of a legitimate reason to do this. As with anything, thanks StackOverflow for all the options I can pick from 👍. ...

  • Hugo Di Francesco
    Author
1 min read
#cdn #dev-decoded #productivity

The step-by-step guide to create a domain redirect with Cloudflare

...

  • Hugo Di Francesco
    Author
1 min read
#python #graphql #web development

Python GraphQL client requests example using gql

An example consuming a GraphQL API from Python using gql. Full code example at HugoDF/python-graphql-client-example. ...

  • Hugo Di Francesco
    Author
1 min read
#deployment #meta #css #hugo

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: I always rave about my blog setup, it’s simple, fast and just works I used Hugo, “The world’s fastest framework for building websites”, a static site generator I used a t ...

  • Hugo Di Francesco
    Author
8 min read
← Next Posts Page 3 of 6  Previous Posts →
Code with Hugo
Latest Posts Twitter Github Medium