Adding Unit Testing to your Express app is easier than you might think

Originally published at https://fek.io.

Whether you are doing test-driven development (TDD) or are just looking for a way to add automated testing to your express app, this can be accomplished fairly easily using many different unit testing frameworks. With Node.js, I have used a number of different testing frameworks. One of the nice things about Node is that there is no shortage of options when it comes to testing.

The testing framework I prefer to use is Jest, but it is not a requirement for unit…


Node.js and the twit module make it very easy to create Twitter bots

Originally published at https://fek.io.

One of the many popular applications that can be written using JavaScript and Node.js is a bot. Bots can be thought of simple applications that can be used to advertise or respond to users on chat services, social media platforms and team communication software.

Some services heavily rely on bots while others outright ban bots when they are encountered. But bots can be used for good as well as evil. Bots can also be used with some sort of AI for interacting with users. …


Read about some of the amazing things you can do with JavaScript

Originally published at https://fek.io.

I am often amazed at some of the software that people write using JavaScript as the language. When JavaScript was first introduced in 1995 it was considered by many as a ‘Toy’ language. At that time Java was considered to be the serious language with ‘Java Applets’ that could be run in web pages.

JavaScript since then has been implemented into a number of different places including micro-controllers, server applications and even desktop applications. …


JavaScript has had Async/Await for a couple of years, but more and more languages are getting these features

Originally published at https://fek.io.

I will be doing a presentation to the JaxNode User Group on July 15th on the Async and Await feature in JavaScript. I have done some posts on Async and Await recently as well. One of the neat things about Async and Await is that it is finding it's way into more and more programming languages.

Concurrency

Concurrency is becoming more and more important in today’s software. The reason is pretty simple. If you look at the processors that are being manufactured today, we are getting more and more transistors onto chips as well as more…


Developers trying to debug with Xcode and Safari may run into this crash

Originally published at https://fek.io.

I was running into nasty crash whenever I tried to debug the WKWebView in one of my iOS apps. It is a common practice among developers to debug using Safari while running JavaScript code in their WebViews.

I noticed several months ago whenever I had Safari running on my Mac, and I was running the debugger in Xcode, I would get a crash with the following exception.

It turns out there is a bug in iOS 14.5 and 14.6 that prevents developers from…


Find out how to use MDX instead of Markdown in your Gatsby Blog

Originally published at https://fek.io.

MDX is a hybrid of Markdown syntax and React JSX syntax. Authors who are writing posts in Markdown can use React components in their posts.

Currently Markdown allows authors to add HTML tags to their posts. One of the nice things about React is that it makes it possible for us to create components of a combination of HTML elements, and then reuse those elements in our React applications. …


Make your Tags linkable by creating a Tag template for your Gatsby Site

Originally published at https://fek.io.

I recently posted on how to add tags to your Gatsby site using FrontMatter. After doing that change to my blog, I also wanted to add linking as well to my posts, as well as a page that listed all Tags.

Gatsby actually has the queries and code examples you need pretty well documented. I wanted to show how I used these on my site. The Creating Tags Pages for Blog Posts documentation describes the code you will have to write in order to add the tag linking and templates to your site. The code…


Use the Mutation Observer to watch and identify changes occurring to any DOM element

Nearly a decade ago I used to use jQuery for manipulating the document object model, or (DOM), in my web applications. jQuery has been supplanted in popularity by other frameworks like Angular, Backbone and React. These frameworks have become almost a standard for web development.

I ran into a situation a couple of years ago where I had to watch for changes to a particular DOM element, and remove any children that were being added by another framework inside of a WebView. …


Tags are an essential part of Web 2.0

Originally published at https://fek.io.

I moved my site to Gatsby a couple of years ago. I have used several different blogging engines in the past including Orchard for .NET and BlogCFC. Both of these blogging engines support adding tags to your posts.

When I setup my blog I never bothered setting up tags because I could never get them to show up in my GraphQL queries. Going through my build logs today I discovered what the problem was, I was using two different types of tags in my FrontMatter.

Frontmatter

FrontMatter is…


Find out how you can send email easily from Node.js

Originally published at https://fek.io.

Like many other HBO Max subscribers, I received an email titled “Integration Test Email #1” to the email I use for my HBO Max account. I decided to write a post about how you can send your own ‘Integration Test Email’ from Node.js. There are a couple of different ways.

David Fekke

I am a software engineer and commercial pilot in jacksonville, Fl. I also produce videos for the Polyglot Engineer Channel on YouTube.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store