Eran Schoellhorn
I'm a full stack web developer, JavaScript enthusiast, and all around nerdy kind of guy. These are my slide decks for various meetups and conferences. If you'd like to get in touch with me, hit me up on Twitter!
learnyounode!
Gainesville JavaScript
July 8th, 2015
Frontend Developer @ 352 Inc.
me@eran.sh @EranSchoellhorn
?
Family Man
Chicken Farmer
Amatuer Professional Eater
An intro to Node.js via a set of self-guided workshops."
Go to nodejs.org, click Install, Install..
Open Terminal, enter
npm install -g learnyounodeMake a directory somewhere.
learnyounodeGo there.
Enter .
Use arrow keys to navigate, enter to select stuff.
Start with "HELLO WORLD"
Create a node script that prints "HELLO WORLD" to the console
$ node exercise1.js
HELLO WORLDHELLO WORLD
Create a script that takes any number of numeric arguments
and prints their sum.
$ node exercise2.js 1 1 1
3BABY STEPS
Create a script that prints the number of lines in a file.
Accept a filename as an argument.
$ node exercise3.js exercise1.js
1MY FIRST I/O
Create a script that prints the number of lines in a file.
Accept a filename as an argument. Use Async this time, Pal.
$ node exercise4.js exercise1.js
1MY FIRST ASYNC I/O
Create a script which lists all files in a given directory with a given extension.
$ node exercise5.js ~/Downloads zip
roboto.zip
pants.zipFILTERED LS
Move logic from previous exercise into an external module. Include module in main script using require()..
$ node exercise6.js ~/Downloads zip
roboto.zip
pants.zipMAKE IT MODULAR
Create a script that takes a URL as an argument. When run, the script should console.log the response of the provided URL.
$ node exercise7.js http://randomword.setgetgo.com/get.php
gutturalismHTTP CLIENT
Do the same thing as before but first print the number of characters in the response, then print the whole response.
$ node exercise8.js http://randomword.setgetgo.com/get.php
11
nonlovingHTTP COLLECT
Take 3 URLS, get all their responses and then print to
console in order they were provided.
$ node exercise8.js http://randomword.setgetgo.com/get.php ...
chiripa
bibliothecarial
tetrafoliousJUGGLING ASYNC
By Eran Schoellhorn
I'm a full stack web developer, JavaScript enthusiast, and all around nerdy kind of guy. These are my slide decks for various meetups and conferences. If you'd like to get in touch with me, hit me up on Twitter!