Node.js

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 = model; this.year = year; } v... »

Prototyping with Node.js

My use of the word prototype, is not the function, but rather the concept.  One of my IT mentors taught me that prototyping an application is extremely useful. That is to say, to quickly create a functioning application in some scripting language.  Then, if the app’s logic is sound, one can transition it to a different language if needed. Node.js In my current situation, I had a tool I wrote... »

Node.js – Managing Dependancies

Similar again to the Ruby Gemspec, Node.js has a file that manages all the dependancies for the project. This is managed through a file called package.json.  In the json formatted file, you simply add the dependancies you’re wanting in the project, along with the version. Here’s an example: { "name": "NodeJS", "version": "0.0.0", "private": true, "scripts": { "start": "node ./bin/www" ... »

Node.js – Installing Libraries and Frameworks

This article assumes you have Node.js and NPM installed. Similar to Ruby and it’s gem methodology, Node.js has a structure of installing libraries through NPM. Installing to a Single Project Simply go to the directory of your project and type the command npm install [library name] you can also use npm uninstall [library name] This installs the library or framework into the project you’... »

Node.js – Intellij SetUp

This article assumes you’ve installed Node.js on the computer. In order to make use of Node.js and the Express.js framework in Intellij, you need to install the plugin. This is how it works on OSX, Windows should be similar…. When you launch Intellij, close any project that opens. Make sure you’re at the “Welcome to Intellij” window. In the bottom right of the window ... »

Page 1 of 212