This article is part of an unofficial companion for learnyounode, a teaching tool for node.js. I wrote this to help myself understand node.js, and the learnyounode tutorials. This walkthrough assumes that you will also read the lesson instructions and lesson hints, as well as any referenced documentation in each lesson. This walkthrough contains both my solutions as well as the official solutions. However, if one or the other is missing, you can find the solutions on github as well. Lastly, at the time of writing this, I am far being any kind of expert, so take what I have to say with a grain of salt.
To get started, download and install the appropriate version of node.js for your operating system. You can find it here. If you are Windows user, you will need to restart your computer after you have installed node. You should also consider using a text editor or IDE with syntax highlighting, but you probably already knew that. I am partial to Atom (free) or Sublime Text (paid).
After you have installed node, launch the terminal and navigate to the directory you want to install learyounode to, probably ~/user/node-modules/. Once you have navigated to your preferred directory, enter the following into the command line.
npm install learnyounode -g
If you are a linux or mac user and your download fails, try this instead.
sudo npm install learnyounode -g
Enter your credentials when prompted.
If you are a windows user and your install fails, you are on your own for now (sorry). If all else fails, try to google the errors you get. You probably aren’t the first to run into trouble.
After learnyounode is installed, you can get started by launching it from the command line.
You will know if you were successful when you see the learnyounode menu.
Woah! Looks like an old DOS program or something. It is actually a node.js app. One of the great things about node is that not only can it be used as a server side scripting language, it can also be used to make nifty command line applications such as learnyounode.
learnyounode Lesson 1 – Hello World!
learnyounode Lesson 2 – Baby Steps
learnyounode Lesson 3 – My First I/O!
learnyounode Lesson 4 – My First Async I/O!
learnyounode Lesson 5 – Filtered LS
learnyounode Lesson 6 – Make it Modular
learnyounode Lesson 7 – HTTP Client
learnyounode Lesson 8 – HTTP Collect
learnyounode Lesson 9 – Juggling Async
learnyounode Lesson 10 – Time Server
learnyounode Lesson 11 – HTTP File Server
learnyounode Lesson 12 – HTTP Uppercase