Installation Instructions: MS Windows

The INSTALL.md and INSTALL.pdf documents, included in The Hour of Node project itself on GitHub, provide the basic and quick instructions for installing your own local copy of The Hour of Node web application.  Those documents apply to both Apple OS/UNIX and MS Windows.  However, MS Windows installs require some extra steps and additional knowledge, and this post provides that information.

Installation Steps (Prerequisite Software/Utilities)

1.)  Install Git

  • Download it from here: http://git-scm.com/downloads
  • Double-click on the downloaded file: Git-1.9.4-preview20140929.exe     (Currently: 12/2014)
  • On the Welcome screen, click ‘Next >
  • On the GNU General Public License screen, click ‘Next >
  • On the Select Destination Location screen …
    • if you’re okay with the default:  C:\Program Files (x86)\Git … click ‘Next >
    • or, change the install directory to something more desirable (and then click ‘Next >’)
  • On the Select Components screen …
    • recommend options:
      • adding additional icons – On the Desktop
      • checking ‘Use a TrueType font in all console windows…’
    • click ‘Next >’
  • On the Select Start Menu Folder screen, click ‘Next >
  • On the Adjusting your PATH environment screen
    • it is recommended that you choose:  Use Git from the Windows Command Prompt
    • click ‘Next >
  • On the Configuring the line ending conversions screen
    • it is recommended that you choose: Checkout as-is, commit as-is
    • click ‘Next >
  • [… Wait while Git installs …]
  • On the final screen, click ‘Finish

2.)  Install Node.js

  • Download it from here: http://nodejs.org/download/
  • Double-click on the downloaded file: node-v0.10.33-x64.msi     (Currently: 12/2014)
  • On the Welcome screen, click ‘Next
  • On the End-User License Agreement screen …
    • check:  I accept the terms in the License Agreement
    • click ‘Next
  • On the Destination Folder screen …
    • if you’re okay with the default:  C:\Program Files\nodejs\, click ‘Next
    • or, change the install directory to something more desirable (and then click ‘Next’)
  • On the Custom Setup screen
    • it’s recommended that you take the defaults
    • click ‘Next
  • Click ‘Install
  • [… Wait while Node.js installs …]
  • On the final screen, click ‘Finish

IMPORTANT Note: At some point, in order for npm (which comes with Node.js) to work inside Windows CMD prompt, you will need to reboot your system; even though you’re never prompted to reboot by Node.js’/npm’s installer.

Installation Steps (The Hour of Node web-app)

3.)  Download and install The Hour of Node project (as a Git Clone)

This will be done via Git – using the ‘clone’ command

  • Verify that Git has installed successfully, by typing: git
    • If git usage information displays then you’re git installation is fine … proceed to the next sub-step.
    • However, if the error displays: ‘git’ is not recognized as an internal or external command … then, try rebooting your system and repeat this step.
  • Bring up the CMD prompt
  • Change directory (in the CMD prompt) to a directory where you’d like your local The Hour of Node repository to be
    • For this post’s purposes, we will clone The Hour of Node project to: C:\temp
  • In a web browser:  go to The Swan Factory’s hourofnode GitHub webpage:  https://github.com/TheSwanFactory/hourofnode
  • Click ‘Copy to clipboard’ icon next to ‘HTTPS clone URL’
  • In the CMD prompt, type:
  • The Hour of Node repository should download and “hourofnode” directory should be created:  C:\temp\hourofnode

Now you should have an official Git repository, locally, of The Hour of Node web-app.

IMPORTANT Note: In order to use npm in the CMD prompt, if you haven’t done-so already, you will need to reboot your Windows system.

4.)  The following directories need to be manually created:

  • C:\Users\<username>\AppData\Roaming\npm
  • C:\Users\<username>\AppData\Roaming\npm-cache
  • C:\Users\<username>\AppData\Local\npm
  • C:\Users\<username>\AppData\Local\npm_modules
  • C:\Users\<username>\AppData\Local\npm-cache

Not doing this will result in errors – when you try to use npm – such as:

Error: ENOENT, stat ‘C:\Users\<username>\AppData\Roming\npm’

The rest of the steps will be done in the Windows CMD prompt …

Note:   On Windows 8, you will need to run the CMD prompt as administrator

5.)  Install npm

  • Change directory to the new “hourofnode” directory (> cd c:\temp\hourofnode)
  • Type the npm install command:
    • npm install

6.)  Install gulp

  • Type the npm command:
    • npm –g install gulp

CONGRATULATIONS!  This completes the installation steps necessary for a local clone of The Hour of Node web application on an MS Windows system.

Launching The Hour of Node web-app

1.)  In the CMD prompt:

  • Change directory to the top directory where The Hour of Node resides  (> cd C:\temp\hourofnode)

2.) Type the command: gulp  (> gulp)

A successful start-up of The Hour of Node web-app should result in lines similar to these (in the terminal):
[20:09:00] Requiring external module coffee-script/register
[20:09:04] Using gulpfile c:\Temp\hourofnode\gulpfile.coffee
[20:09:04] Starting ‘main’…
[20:09:04] Starting ‘sync’…
[20:09:04] Finished ‘sync’ after 67 ms
[20:09:04] Starting ‘watch’…
[20:09:04] Finished ‘watch’ after 55 ms
[BS] Local URL: http://localhost:3000
[BS] Serving files from: web
[BS] Watching files…
[BS] File changed: c:\Temp\hourofnode\web\main.js
[20:09:06] Finished ‘main’ after 2.57 s
[20:09:06] Starting ‘default’…
[20:09:06] Finished ‘default’ after 8.55 µs

And a web browser should pop-up displaying the local instance of The Hour of Node web-app.

The web-app is automatically (and locally) served-up at:
http://localhost:3000

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: