H
How To Node
howtonode.org · Group blog · on HN since 2010
How To Node is a tutorial blog from the early Node.js days with code examples on Express, MongoDB, streams, and more.
What HN saysHN commenters recommend it as having the best Node.js examples with working code, and list it among good free learning resources.
49HN people shared it
27linked it in comments
41stories submitted
317story points
10 years agolast shared
2010people per year2026
Most-shared posts
- 1How To Node - Node.js Blog12 people · 2 points · first shared 2010 · discussion on HN
- 2Express, MongoDB & Node.js tutorial (updated)5 people · 10 points · first shared 2010 · discussion on HN
- 3Understanding process.nextTick() in NodeJS4 people · 5 points · first shared 2012 · 1 comments on HN
- 4How to Node: "Do" it fast3 people · 37 points · first shared 2010 · 2 comments on HN
- 5Daddy, what's a stream?3 people · 4 points · first shared 2013 · discussion on HN
- 6Hello Node3 people · 2 points · first shared 2010 · discussion on HN
- 7Just Connect it Already - How To Node2 people · 27 points · first shared 2010 · 1 comments on HN
- 8Using Facebook Connect with NodeJS2 people · 23 points · first shared 2010 · discussion on HN
- 9Learning Javascript with Object Graphs2 people · 11 points · first shared 2010 · discussion on HN
- 10Why use "closure"?2 people · 6 points · first shared 2010 · 1 comments on HN
- 11The Step of the Conductor2 people · 2 points · first shared 2010 · discussion on HN
- 12Capturing Packets in JavaScript with node_pcap2 people · 2 points · first shared 2010 · discussion on HN
- 13Prototypal Inheritance2 people · 1 points · first shared 2010 · discussion on HN
- 14How to install nodejs2 people · first shared 2011
- 15JavaScript: what is "this"?1 people · 96 points · first shared 2010 · 47 comments on HN
What HN people wrote when they linked it
bdickason · 2011-06-03
I found the 'How to Node' blog to have the best examples that actually contained working code (Express and other sites' example code doesn't seem to be updated or work): http://howtonode.org/
I also stumbled upon this node project on Github and was learning from how he put stuff together: https://github.com/kelper/Poll
bfm · 2011-03-14
Thank you!
I learnt Node.js mostly by looking at projects on github, reading Node.js API http://nodejs.org/docs/v0.4.2/api/ and following these two great resources http://howtonode.org/ and http://blog.nodejitsu.com
JimBastard · 2010-02-21
node is amazing and the community is non-stop.
http://www.howtonode.org
http://wiki.github.com/ry/node/node-users
icpmacdo · 2015-01-15
I am setting one up right now for fun through digital ocean using following this tutorial[1] using node JS
http://howtonode.org/express-mongodb
smilepet_26 · 2014-11-17
These are some excellent resources for you to get started with node and free too.
http://howtonode.org
http://nodejs.org/documentation/tutorials
http://nodetuts.com/ (video tutorials)
http://blog.modulus.io/absolute-beginners-guide-to-nodejs
When you are done, look at this list of extensive node at Stackoverflow:
http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-n…
doktrin · 2013-01-24
I've never configured Node on Windows, but apparently it requires Cygwin [1]
Currently, you must use cygwin to install node. To do so, follow these steps:
[1] http://howtonode.org/how-to-install-nodejs
edwardtrunk · 2012-04-21
2nd that!!! Create a small 100% javascript client side application and don't use any libraries or frameworks, and implement using MVC approach. Going thru an exercise like this will really help out when working with the frameworks and give you a nice background with Javascript. One of the things that can be a bit confusing for folks new to Javascript is how OO and Inheritance is done. I would recommend this book: Pro Javascript Design Patterns and http://howtonode.org/object-graphs this 3 part tutorial
ricardobeat · 2012-02-04
JSHint [1] - don't fall prey to JSLint's dictatorship
UglifyJS [2] for compression
For debugging: get used to webkit inspector and Firebug. console.log is the best thing since sliced bread (object inspection, etc). Use a `debugger;` statement to insert breakpoints [3].
node.js: get started with Express [4] and mocha [5]. Make the jump to coffeescript after you're comfortable, it's a great fit on the server. Read howtonode's articles to get an introduction to various aspects of node [6].
[1] jshint.com
[2] https://github.com/mishoo/UglifyJS
[3] https://developer.mozilla.org/En/Debugging
[4] http://expressjs.com
[5] http://visionmedia.github.com/mocha/
[6] http://howtonode.org/
jalanco · 2011-10-28
I would recommend that you ask this question on the nodejs Google group to get a better response (https://groups.google.com/forum/#!forum/nodejs) or Stack Overflow.
Update: Also, the good folks at nodejitsu have compiled a great resource at http://docs.nodejitsu.com/
And more links:
http://www.readwriteweb.com/hack/2011/04/6-free-e-books-on-nodejs.php
http://howtonode.org/
http://nodebeginner.org/index.html
http://www.manning.com/cantelon/ (node.js in action meap)
http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-n…
tmpvar · 2011-05-13
take a peek at http://howtonode.org/ - some stuff is out of date as node is a rapidly evolving platform, but most of it holds true.
firefoxman1 · 2011-04-25
Maybe it's referring specifically to the "new" keyword that can cause issues if left out when creating instances.
If you look at the code, Spine uses Object.create(this.prototype) for init.
This article is a great explanation on issues with prototypal inheritance http://howtonode.org/prototypical-inheritance
Ataraxy · 2010-12-03
I'm not a pro or anything but this is probably of interest to you:
http://howtonode.org/ is built with node and https://github.com/creationix/wheat is the blogging engine it was built on
Hope it helps.
voodootikigod · 2010-11-19
As a start: http://eloquentjavascript.net/
Listen to: http://www.aminutewithbrendan.com/
Also track: http://www.nakedjavascript.com/
And http://howtonode.org/
brandonkm · 2010-07-28
For books I recommend the Javascript Cookbook ( http://oreilly.com/catalog/9780596806132/ ). It was released a few days ago and from the parts I've read so far, covers a lot of use cases for the language as well as lots of HTML 5 + ECMAscript 5 bits.
If you're interested in building something with a client-side js framework, you should check out this tutorial http://howtonode.org/express-mongodb . It covers how to build a simple blog app with node.js and express.
juvenn · 2010-03-20
Yeah, I've thought about submit http://howtonode.org as well. The articles are explained thoroughly and clearly, very nice stuff there.
Thx for correcting the promise stuff.
RSZC · 2016-12-13
You might want to check out process.nextTick: https://howtonode.org/understanding-process-next-tick
tobik · 2015-06-17
He uses the Hello World code from http://howtonode.org/hello-node so he did not write the Node version.
smtddr · 2014-11-27
>>Setting up any web stack is a pain in the ass and probably just as long of a tutorial.
I beg to differ.
http://bottlepy.org/docs/dev/tutorial.html#quickstart-hello-world
http://howtonode.org/hello-node
(In fairness, I do note that the above examples don't actually have a <button> element to click on before showing helloworld like the Java example)
scotty79 · 2011-10-05
I have a question about Node.js
I hope it's legitimate.
If I have a endless loop in some method that is supposed to generate some part of some webpage of my webapp will it stall the whole app until I restart the server?
From my tests it seems so.
What additional facilities are required to be used so that single bug won't kill the whole app for all users?
Rant mentiones putting nginx in front of node.
UPDATE:
It seems that there is a tool called monit that can restart your server when it stalls:
http://howtonode.org/deploying-node-upstart-monit
bergie · 2011-07-05
There is a HAML parser. http://howtonode.org/haml-for-javascript
But it is a good thing to experiment with different approaches.
grayrest · 2010-09-16
Promises are definitely gone. The pattern now is that functions taking a callback always take it as the last parameter. The callback always has an error argument as its first parameter.
Since the pattern is predictable, it's easy to write a higher level wrapper around it. I like Kris Kowal's Q promises [1] for most things and Tim Caswell's Do [2] for simple sequencing (a la shell scripts).
[1] http://github.com/kriskowal/q/blob/master/q.js
[2] http://howtonode.org/do-it-fast
aaronblohowiak · 2010-03-19
Node_chat (disclaimer: i've made a couple contributions): example:http://chat.nodejs.org/ code:http://github.com/ry/node_chat
Facebook connect: http://howtonode.org/facebook-connect
List of other apps available on the node wiki:
http://wiki.github.com/ry/node/
bnb · 2014-11-17
> http://howtonode.org
Very infrequent updates. I was told that it shouldn't matter, but ran into several problems immediately when I tried some of their tuts.
> http://nodejs.org/documentation/tutorials
Only lists NodeSchool. Why not just list NodeSchool?
> http://nodetuts.com/ (video tutorials)
Last updated a year and a half ago.
http://blog.modulus.io/absolute-beginners-guide-to-nodejs
So basic it's almost useless. It introduces you to including modules, package.json, and callbacks, but if you want to actually go further, there's not much help.
>When you are done, look at this list of extensive node at Stackoverflow:
>http://stackoverflow.com/questions/2353818/how-do-i-get-started-with-n…
Pretty out of date as well.
OP: There's not a ton of resources for jumping into Node easily. The majority of the ones I've found haven't worked for me--however, that could just be me, not being an experienced programmer. I just took the Real Time Web with Node.js course at CodeSchool, and it was pretty good. I learned a lot, familiarized myself with certain modules and functions, and was able to come out of it feeling positive about the experience. Highly suggested.
latchkey · 2013-02-17
Node handles one request at a time. It isn't multithreaded. It will receive a request, process that request and return a response. If another request comes in at the same time another request is in process, it is queued until the currently processing request is finished. I googled around, here is a good explanation for you. http://howtonode.org/understanding-process-next-tick
The way my application worked is that we had 'long' running things like saving data to a database happening before we return a response to a client (in this case an iphone app). Sometimes mongo, the dyno, networking, phase of the moon, talking to the facebook api, etc... we would get 'slow' processing and it would take a few seconds for a response to make it to the client. As soon as this happens, on a heavily loaded system, the heroku router would get backed up (since it only routes to 2-3 dynos at a time) and would start throwing H12 errors.
So, what we did was rewrite the entire app to do minimal data processing in the web tier, send the response back to the client as quickly as possible. At the same time, we also send a rabbit queue message out with all the instructions in it to process the data 'offline' in a worker task. There is no spinup since these workers are running all the time. We even have several groups of workers depending on the message type so that we can segregate the work across multiple groups of dyno workers. This also allows us to easily scale to more than a 100 dynos to process…
ZoFreX · 2011-05-18
It's a pity that this is so difficult to try. The blog post has so much detail and effort put into it, but all that shine and polish disappears when you try to install it.
Specifically Step 1 of the instructions[1] has a link titled "install node and npm" [2] which has the line 'git clone git://github.com/ry/node.git', which is incorrect. The correct URL (as far as I can tell) would be 'git://github.com/joyent/node.git'.
In addition the linked instructions say nothing of npm, which can be installed quite easily by running 'curl http://npmjs.org/install.sh | sh' as root.
Back to the TermKit instructions again, and step 5 says 'git clone [email protected]:unconed/TermKit.git --recursive', which didn't work for me. What worked was 'git clone git://github.com/unconed/TermKit.git --recursive'.
Finally after all that, I just see 'You cannot use this version of the application TermKit.app with this version of Mac OS X.'. Would have been nice to mention that at the start.
[1]: https://github.com/unconed/TermKit
[2]: http://howtonode.org/how-to-install-nodejs
javajunky · 2010-07-19
creationix · 2010-07-26
I have written extensively on this topic, here are a few articles. Here is the progression leading up to the development of Step.
http://howtonode.org/control-flow
http://howtonode.org/control-flow-part-ii
http://howtonode.org/control-flow-part-iii
http://howtonode.org/do-it-fast
http://howtonode.org/step-of-conductor