Blog


Socket.io Example that does a Full Broadcast of a Counter that Increments by One
Posted on July 16, 2015 in Node.js by Matt Jennings

// require express and path
var express = require(“express”);
var path = require(“path”);

// Create express app
var app = express();

// Static content
app.use(express.static(path.join(__dirname + …

Read more


Simple Socket.io Example with Comments to Explain Event Emitting and Listening
Posted on July 15, 2015 in Node.js by Matt Jennings

// require express and path
var express = require(“express”);
var path = require(“path”);

// Create the express app
var app = express();

// Static content
app.use(express.static(path.join(__dirname …

Read more


A Description of package.json File using Node.js, Including How to Install Packages Using It
Posted on July 15, 2015 in Node.js by Matt Jennings

The package.json file will live at specific directory I’m working in for a Node.js app.
The “name” property value needs to …

Read more


JavaScript Merge Function that Mergers Two Arrays Already Sorted from Lowest to Highest Numbers
Posted on July 15, 2015 in Algorithms, JavaScript by Matt Jennings

// Function merges 2 arrays that are already sort from
// Lowest to highest numbers
function mergeSortedArrays(arr1, arr2) {

Read more


JavaScript Insertion Sort Algorithm
Posted on July 14, 2015 in Algorithms, JavaScript by Matt Jennings

See this Wikipedia entry for the insertion sort algorithm. This animated GIF from that entry explains more …

Read more