Blog

Archive for the Node.js Category


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


Example of Setting Up a Simple Node.js Web Page
Posted on July 10, 2015 in Node.js by Matt Jennings

// get the http module
var http = require(“http”);

// fs module allows us to read and write content for responses
var fs …

Read more


Node.js, npm, and Homebrew Mac Terminal Commands
Posted on July 10, 2015 in Command Line, Mac, Node.js by Matt Jennings

brew install node

node -v

npm list -g –depth=0

brew update
brew upgrade node

brew update && brew upgrade

brew uninstall node