This is the course materials for the Asynchrony in JavaScript course at HarvestJS.
Click "download zip" on the bottom-right of this page, and unzip the content into a new directory.
In each folder are various JavaScript files you can run from the command-line in node. These instructions assume you chose the default options when installing node, and that node is now in your PATH.
- Open a command prompt or terminal in the folder with this content
- Run
node thefile.js
to run a file named "thefile.js" - The script's results will appear in the terminal window, then node will exit
- Read the source code by opening the file in any text editor like Notepad or Sublime Text
This course will walk you through patterns for working Asynchronously in JavaScript. Though the content works
equally well in a browser, we use node for simplicity. You could just as easily run each sample in a web browser
if you changed var async = require('./lib/async');
to be <script src="lib/async.js"></script>
.
Rob Richardson is a JavaScript and .NET developer with over a dozen years experience. You can follow him on his blog or on twitter.