-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
5,074 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# What is Async JavaScript? | ||
|
||
> [https://www.youtube.com/watch?v=y8xPMYwQ0U8](https://www.youtube.com/watch?v=y8xPMYwQ0U8) | ||
Install [Node.js](https://nodejs.org/). | ||
|
||
Within this folder run the terminal command `npm install` to install the | ||
`devDependencies`. | ||
|
||
Run `node index.js` to run the script through the server side. | ||
|
||
Then run `npm start` to start up a development server on `http://localhost:9966` | ||
and run the scripts through the client side. | ||
|
||
Use the `node-debug` command by installing [node-inspector](https://www.npmjs.com/package/node-inspector) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
var nets = require('nets') | ||
|
||
nets('one.bear', function (err, resp, one) { | ||
console.log(one.toString()) | ||
done() | ||
}) | ||
nets('two.bear', function (err, resp, two) { | ||
console.log(two.toString()) | ||
done() | ||
}) | ||
nets('three.bear', function (err, resp, three) { | ||
console.log(three.toString()) | ||
done() | ||
}) | ||
|
||
var count = 0 | ||
function done () { | ||
count++ | ||
if (count >= 3) { | ||
console.log('All done') | ||
} | ||
} | ||
|
||
|
||
// var fs = require('fs') | ||
// | ||
// fs.readFile('one.bear', function (err, one) { | ||
// console.log(one) | ||
// }) | ||
// fs.readFile('two.bear', function (err, two) { | ||
// console.log(two) | ||
// }) | ||
// fs.readFile('three.bear', function (err, three) { | ||
// console.log(three) | ||
// }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "what-is-async-javascript", | ||
"version": "0.1.0", | ||
"description": "", | ||
"main": "index.js", | ||
"scripts": { | ||
"start": "budo index.js", | ||
"test": "node test.js" | ||
}, | ||
"author": "Kyle Robinson Young <kyle@dontkry.com> (http://dontkry.com)", | ||
"license": "MIT", | ||
"devDependencies": { | ||
"budo": "^7.1.0" | ||
}, | ||
"dependencies": { | ||
"nets": "^3.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
three |
Oops, something went wrong.