Node.js Mini-Course

Install all the software described below. Get started learning Node.js with the instructions that follow.

Installation

Software Installation Instructions Installation Verification Instructions

Windows or OS X

Use the installation disks that came with your computer to install Windows or OS X.

You know it worked if:

  1. You see a Start menu or a Dock. If you see penguins, you are probably using Linux and will not be able to use Brackets or Theseus.

Google Chrome

Use the big download button on their web page.

You know it worked if:

  1. You can launch Chrome and see a web browser.

Node.js

Use the big install button on their web page to download an installer.

You know it worked if:

  1. You can run node in a console and get a JavaScript prompt

  2. You can run npm in a console and see instructions for how to invoke npm

Brackets
(code editor)

Use the big download button on their web page.

Download the latest version. This screenshot is old.

You know it worked if:

  1. You can launch the Brackets application and see a text editor.
    OS X: If OS X says it doesn't trust Brackets, locate Brackets in the Finder and open it by right-clicking and selecting "Open". You will be given the option to trust Brackets.

Theseus
(debugging extension)

Theseus:

  1. Launch Brackets.

  2. Follow the instructions in the “Install” section of the Theseus README.

  3. Close and re-launch Brackets.

node-theseus:

  1. Windows: Open a console and run npm install -g node-theseus
    OS X: Open a console and run sudo npm install -g node-theseus

You know it worked if:

  1. You can launch the Brackets and see a new menu item, Help > Send Theseus Feedback...

  2. When you type node-theseus in a console, you see instructions for how to run node-theseus

Start Programming!

  1. In Brackets, click the File > Open Folder... menu item and open the node-course directory (the directory containing this file, README.html).

  2. Open the public/tutorial-01.html file in Brackets.

  3. Open the File menu and ensure that Theseus is enabled and in Static mode.

  4. Click the lightning bolt in the upper-right corner of Brackets to Go Live. This will open the current file in Chrome and establish a sweet debugging connection to that page.

    Brackets may ask you to relaunch Chrome if it can't establish a connection. You should do what it says.

  5. You can close this tab now.

Notes

Consoles/Terminals

You run commands in a terminal by typing them and pressing Enter. Here are instructions for opening a terminal.

OS X

Launch Terminal.app. The easiest way is to activate Spotlight by clicking the magnifying glass in the upper right corner of the screen (or pressing Apple+Space), typing "terminal", and clicking the first Application result.

Windows

Launch cmd. The easiest way is to open the Start menu, typing "cmd" in the search box, and selecting the result for the program cmd.