gitmyhub

learnyounode

HTML ★ 7.4k updated 4y ago

Learn You The Node.js For Much Win! An intro to Node.js via a set of self-guided workshops.

An interactive command-line workshop that teaches Node.js fundamentals, you write real code, run it, and get instant pass/fail feedback for each exercise.

JavaScriptNode.jsnpmsetup: easycomplexity 1/5

Learnyounode is an interactive tutorial for learning Node.js, the runtime that lets you run JavaScript outside of a web browser, typically for building servers and scripts. Rather than a written guide or video, it is a self-contained command-line program you install and run on your own computer. You navigate a menu of exercises, read the instructions, write a solution in a JavaScript file, and then run a verify command to check whether your answer is correct.

Installation requires Node.js to already be on your machine. Once you have it, you install learnyounode with a single npm command, and then launch it by typing learnyounode in your terminal. The interface shows a list of lessons in roughly ascending order of difficulty.

The exercises cover the fundamentals of Node.js programming. They start with a basic program that prints text to the screen, then move through topics like reading files, working with command-line arguments, handling asynchronous operations (where a task starts and your code continues without waiting for it to finish), making HTTP requests, creating a simple HTTP server, and working with data streams. These are the core building blocks for real Node.js applications.

The workflow for each lesson is consistent: select the exercise, read the printed instructions, write a program.js file that satisfies them, and run learnyounode verify program.js. The tool compares your output to the expected result and reports either PASS or FAIL with hints.

Learnyounode is part of the NodeSchool project, a broader collection of similar self-guided workshop tools for different JavaScript topics. After completing this one, the README suggests moving on to stream-adventure, which covers Node streams in more depth.

Where it fits