Node: Inheritance

Using the events and util classes in the core Node library, we can define inheritance: var Events = require(‘events’); var util = require(‘util’); function hello() { this.greeting = “Hi!”; } util.inherits(hello, Events);  

Node: Prototype Inheritance

Function construction in Node is pretty straight forward: function someFunction(){ console.log(“hi”); } Functions can also be assigned to an object like so: var greeting = function someFunction(){ console.log(“hi”); } You can also follow a class type pattern doing something such as: function Car(make, model, year){ this.make = make; this.model = Continue Reading

Node.js – What is it?

Node.js is simply server based JavaScript. Some, including Intellij, refer to it as a framework.  Yet others want to be clear that Node.js on it’s own is not a framework.  There is a web framework called Express.js.  Express.js provides the MVC architecture required to build web apps in Node.js. Why Continue Reading