• Home
  • Books
  • Node
  • Testing
  • JavaScript
  • More...
  • Search
  • About
  • Gear & Setup

JavaScript

A collection of 104 posts

#javascript #node

ES6 by example: a module/CLI to wait for Postgres in docker-compose

When using docker-compose, it’s good practice to make anything that relies on Postgres wait for it to be up before launching. This avoids connection issues inside the app. This post walks through how to deliver this functionality both as a CLI and a module that works both as a Co ...

  • Hugo Di Francesco
    Author
9 min read
#javascript #rxjs #reactive programming

Better HTTP Polling in JavaScript with RxJS 5

Here is the implementation for a function that takes a Promise-based fetch function (eg. using axios) and a function that decides if a response has been successful (from a polling perspective) and polls the fetch function until the isSuccess function returns true: ...

  • Hugo Di Francesco
    Author
2 min read
#jest #javascript #node #Express

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 regressions and to document the behaviour of a piece of software. Express is one of the most widespread libraries for building backend applications in JavaScript. What follows is a summar ...

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

How to make beautiful, simple CLI apps with Node

Channel your inner Sindre Sohrus and ship a beautifully simple CLI app using Node. Command line apps are a neat way to package repetitive tasks. This will walk you through some tools that are useful to build CLI apps. ...

  • Hugo Di Francesco
    Author
3 min read
#express #node #javascript #docker #redis

A Docker/docker-compose setup with Redis and Node/Express

Redis and Express are tools that provide a simple and clean approach to their problem domains. What follows is a Docker/Docker Compose v2 setup. The repo is available at: https://github.com/HugoDF/express-redis-docker. The docker-compose.yml is available at: github.com/HugoDF/exp ...

  • Hugo Di Francesco
    Author
5 min read
#vuejs #jest #testing #javascript

From AngularJS to Vue.js, CommonJS and Jest

The trials and tribulations of kicking off an AngularJS -> Vue.js migration AngularJS was pretty groundbreaking. It’s still impressive to this day, packed with a router, an HTTP client, a dependency injection system and a bunch of other things I haven’t necessarily had the pl ...

  • Hugo Di Francesco
    Author
7 min read
#javascript #vuejs #web development

A simple, real-world Vue.js directive example

Vue.js is “The Progressive JavaScript Framework”. It takes inspiration from all prior art in the view library and frontend framework world, including AngularJS, React, Angular, Ember, Knockout and Polymer. In Vue (and Angular/AngularJS), a directive is a way to wrap f ...

  • Hugo Di Francesco
    Author
4 min read
#javascript #frontend #web development

React vs Angular vs Vue in 2019: How components won the “framework wars”

React, Vue or Angular: Why it doesn’t matter. 2018 marked the end of JavaScript fatigue and the React vs Vue vs Angular (“framework wars”) debate A typical frontend/JavaScript developer career usually involves some jQuery and associated plugins before moving on to React, Angular ...

  • Hugo Di Francesco
    Author
9 min read
#CSS #javascript #animation #web development

Animations: CSS vs JavaScript

When should you use JavaScript when you can use CSS? This post was sparked by a question I answered on Quora: Which is better to use, CSS or JS? The web frontend is built with the triumvirate of HTML, CSS and JavaScript (see “Backend code, frontend code and how they interact” fo ...

  • Hugo Di Francesco
    Author
4 min read
#Testing #javascript #Productivity

AVA, low-config testing for JavaScript

A JavaScript testing library for 2017 AVA is a Futuristic JavaScript test runner. Some of its best features are: it works out of the box, no need to specify a blob for test files or add Babel hooks it runs tests in parallel, this stops you from using global state and runs faster ...

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