I’ve been hearing a lot about Node.js recently, so I decided to install it and give it a whirl. I know I’m a little late to the game, but here’s my breakdown of Node.js;
What is Node.js?
This one took a little while to get my head around but essentially node.js allows you to do I/O in javascript. It’s a different paradigm in server-side programming, because it uses callbacks to handle responses in I/O instead of blocking like most server side technologies. An example (taken from the node.js homepage):
var http = require('http');
http.createServer(function (req, res) {
res.writeHead(200, {'Content-Type': 'text/plain'});
res.end('Hello World\n');
}).listen(8124, "127.0.0.1");
console.log('Server running at http://127.0.0.1:8124/');
You can see that the server is created, then takes in a callback once the server is created. This is nothing new to users familiar with Javascript events, but using this in the context of I/O (excluding DOM manipulation) is certainly new.
To get an in-depth introduction to node.js, check out this video by the creater http://www.yuiblog.com/blog/2010/05/20/video-dahl/.
Installing Node.js
Currently, Node.js only runs on Unix based systems. I primarily develop on a Windows box, so I set up an Ubunto machine. Here’s how to get node.js up and running.
- Clone the git repositroy – git clone git://github.com/ry/node.git
- Build Node.js by running the following commands
- ./configure – if any dependencies are missing, then add them.
- make – compile Node.js
- make install – install Node.js (may require sudo)
- make test – test your installation
If all of the commands complete successfully, you’re ready to go!
Using Node.js
Now that we’ve installed Node.js, let’s use the above sample program.
First, save the javascript code to a file (I’ll call it testserver.js). Once you’ve done that, execute the file with node by calling “node testserver.js”.
If we look at the example file code, we see that the script is supposed to start up a webserver on port 8124, so fire up a browser and navigate to localhost:8124 and you should see “Hello World.”
If you did, then you’ve got everything working. Time to start exploring the APIs and modules!
Trackbacks/Pingbacks
buy@generic.LEVITRA” rel=”nofollow”>……
Need cheap generic LEVITRA?…
Purchase@Cheap.Coral.Calcium” rel=”nofollow”>..…
Buynow it…
Get@Abana.Online” rel=”nofollow”>..…
Buyit now…
Buy@Discount.Abilify” rel=”nofollow”>……
Buywithout prescription…
Order@Abilify.Online” rel=”nofollow”>.…
Buynow it…
Cheap@Abilify.Online” rel=”nofollow”>..…
Buygeneric meds…
Get@Abilify.Online” rel=”nofollow”>..…
Buygeneric drugs…
Order@Generic.Abilify” rel=”nofollow”>……
Buywithout prescription…
Order@Discount.Acai” rel=”nofollow”>……
Buywithout prescription…
Purchase@Cheap.Acai” rel=”nofollow”>……
Buygeneric drugs…
Buy@Coral.Calcium.Online” rel=”nofollow”>.…
Buygeneric meds…
Buy@Discount.Coral.Calcium” rel=”nofollow”>..…
Buygeneric meds…
Order@Coral.Calcium.Online” rel=”nofollow”>..…
Buygeneric pills…
Buy@Cheap.Abana” rel=”nofollow”>..…
Buyno prescription…
Order@Cheap.Abilify” rel=”nofollow”>..…
Buyno prescription…
Buy@Discount.Coral.Calcium” rel=”nofollow”>.…
Buygeneric meds…
Order@Cheap.Coral.Calcium” rel=”nofollow”>.…
Buygeneric drugs…
Cheap@Abilify.5mg.10mg.15mg.20mg.30mg” rel=”nofollow”>.…
Buygeneric drugs…
Buy@Discount.Acai” rel=”nofollow”>……
Buynow…
Order@Discount.Acai” rel=”nofollow”>……
Buynow…
Purchase@Generic.Acai” rel=”nofollow”>..…
Buygeneric drugs…
Generic@Acai.500mg.Without.Prescription” rel=”nofollow”>.…
Buyno prescription…
Order@Cheap.Accupril” rel=”nofollow”>.…
Buygeneric drugs…
Cheap@Aciphex.20mg” rel=”nofollow”>.…
Buygeneric meds…
Buy@Aciphex.20mg” rel=”nofollow”>.…
Buygeneric drugs…
Cheap@Generic.Aciphex.20mg” rel=”nofollow”>.…
Buygeneric drugs…
Buy@Acomplia.Online” rel=”nofollow”>.…
Buynow it…
Buy@Cheap.Acomplia” rel=”nofollow”>.…
Buygeneric pills…
Buy@Discount.Acomplia” rel=”nofollow”>.…
Buygeneric meds…
Order@Cheap.Acomplia” rel=”nofollow”>.…
Buyno prescription…
Cheap@Generic.Actonel” rel=”nofollow”>……
Buywithout prescription xiu…
Cheap@Actonel.35mg” rel=”nofollow”>……
Buyit now oil…
Actonel@35mg.Without.Prescription” rel=”nofollow”>.…
Buygeneric drugs zfk…
Order@Generic.Actos” rel=”nofollow”>..…
Buygeneric meds qmo…
Order@Actos.Without.Prescription” rel=”nofollow”>..…
Buygeneric pills zdg…
Order@Discount.Adalat” rel=”nofollow”>.…
Buygeneric meds unm…
Buy@Abana.Online” rel=”nofollow”>..…
Buynow it tly…
Buy@Abilify.Online” rel=”nofollow”>..…
Buywithout prescription dyo…
Cheap@Abilify.Online” rel=”nofollow”>..…
Buygeneric drugs krg…
Purchase@Generic.Acai” rel=”nofollow”>..…
Buydrugs without prescription faj…
Purchase@Acai.Without.Prescription” rel=”nofollow”>.…
Buyit now ojb…
Cheap@Acai.Without.Prescription” rel=”nofollow”>……
Buydrugs without prescription jlg…
Buy@Cheap.Energy.Boost” rel=”nofollow”>……
Buygeneric meds svb…
Buy@Discount.Energy.Boost” rel=”nofollow”>.…
Buygeneric drugs itj…
Buy@Discount.Accutane” rel=”nofollow”>.…
Buygeneric drugs nih…
Order@Cheap.Accutane” rel=”nofollow”>..…
Buyno prescription tao…
Cheap@Generic.Accutane” rel=”nofollow”>..…
Buyno prescription gdt…
Buy@Accutane.10mg.20mg” rel=”nofollow”>……
Buynow it zdg…
Purchase@Generic.Aciphex” rel=”nofollow”>..…
Buydrugs without prescription ygy…
Cheap@Generic.Aciphex” rel=”nofollow”>..…
Buyno prescription lka…
Order@Acomplia.Online” rel=”nofollow”>.…
Buygeneric drugs axm…
Purchase@Acomplia.Online” rel=”nofollow”>..…
Buyno prescription jui…
Purchase@Discount.Acomplia” rel=”nofollow”>……
Buywithout prescription ccw…
Purchase@Discount.Acomplia” rel=”nofollow”>.…
Buynow tqa…
Purchase@Discount.Acomplia” rel=”nofollow”>.…
Buydrugs without prescription fva…
Buy@Cheap.Actonel” rel=”nofollow”>……
Buydrugs without prescription vrg…
Order@Actonel.Online” rel=”nofollow”>……
Buynow fjl…
Get@Actonel.Online” rel=”nofollow”>..…
Buygeneric drugs ajd…
Buy@Generic.Advair” rel=”nofollow”>.…
Buygeneric drugs ouw…
Buy@Advair.Without.Prescription” rel=”nofollow”>.…
Buygeneric drugs hwi…
Cheap@Generic.Advair” rel=”nofollow”>.…
Buydrugs without prescription xab…
Buy@Discount.Aggrenox” rel=”nofollow”>..…
Buyno prescription wkp…
Purchase@Cheap.Albenza” rel=”nofollow”>……
Buyit now knc…
coral@calcium.vitamin.explanation” rel=”nofollow”>.…
Buywithout prescription…
buy@acai.berry.juice” rel=”nofollow”>..…
Buygeneric drugs…
accutane@krupnick.class.action” rel=”nofollow”>..…
Buynow…
aleve@cold.tablets” rel=”nofollow”>……
Buygeneric pills…
coral@calcium.supplements” rel=”nofollow”>……
Buygeneric meds…
abilify@company.buy” rel=”nofollow”>.…
Buywithout prescription…
blue@sky.energy.solar.boost.3048” rel=”nofollow”>……
Buynow it…
accutane@verdict.buy” rel=”nofollow”>..…
Buydrugs without prescription…
adalat@asus.buy” rel=”nofollow”>.…
Buydrugs without prescription…
allopurinol@atrial.fibrillation” rel=”nofollow”>.…
Buygeneric pills…
amoxicillin@online.buy” rel=”nofollow”>.…
Buygeneric drugs…
herpes kelly dating kansas…
Buy_no prescription…
stage 3 ovarian cancer…
Buy_drugs without prescription…
norvasc and theophylline…
Buy_drugs without prescription…
c-section scar pain symptoms pregnancy…
Buy_generic drugs…
strong insulin…
Buy_generic meds…
over the counter birth control…
Buy_generic meds…
the process of methanogens metabolism…
Buy_drugs without prescription…
erectile dysfunction herbal treatment…
Buy_drugs without prescription…
brown algae good for slow thyroid…
Buy_generic drugs…
novo 50 allergy medicine…
Buy_now it…
why do i need estrogen…
Buy_generic drugs…
birth control pills for pms symptoms…
Buy_drugs without prescription…
otc proton pump inhibitors…
Buy_no prescription…
gall bladder cancer surgery…
Buy_it now…
does testosterone make you gain weight…
Buy_generic drugs…
rapid weight loss…
Buy_generic drugs…
cheap travel nebulizer…
Buy_generic drugs…
how strength training effects osteoporosis…
Buy_generic drugs…
xanax and pregnancy…
Buy_generic pills…
lithium alcohol…
Buy_generic drugs…
market drugs edmonton…
Buy_now it…
adrenal cancer symptoms…
Buy_generic drugs…
embed video webpage…
Buy_generic drugs…
indigestion and chest pain…
Buy_now it…
ultimate diet pills…
Buy_generic pills…
what is plavix…
Buy_drugs without prescription…
postpartum remeron…
Buy_no prescription…
lidocaine injectable…
Buy_it now…
medication errors 2nd ed…
Buy_no prescription…
dhea treatment of depression…
Buy_drugs without prescription…
oral cancer hospital…
Buy_generic meds…
joke male birth control…
Buy_generic meds…
pregnancy issues with men…
Buy_no prescription…
decongestants hypertension safe…
Buy_now it…
prozac daily strength…
Buy_generic pills…
acne in cats…
Buy_it now…
canine kidney failure symptoms…
Buy_generic pills…
nursing times alzheimer mavis ford…
Buy_it now…
diseaeses contracted from sand fleas…
Buy_now it…
insulin receptor inhibition…
Buy_without prescription…
pet ct scan results accuracy cancer…
Buy_drugs without prescription…
pictures of herpes blisters…
Buy_generic pills…
sandwich elisa for hepatitis b…
Buy_generic meds…
reversing alcohol induced neuropathy…
Buy_generic meds…
sample tlc diets…
Buy_generic drugs…
natural cures for premature ejaculation…
Buy_generic drugs…
colon cancer lymph node…
Buy_without prescription…
cipro for sinus infection…
Buy_generic meds…
canadian paediatric diabetes association…
Buy_now…
symtons of canine gall bladder disease…
Buy_generic meds…
discovery of zinc in human health…
Buy_now…
rebound phenomenon during gradual clonidine withdrawal…
Buy_drugs without prescription…
emotions surviveing uterine cancer…
Buy_generic meds…
clinical studies of clonidine…
Buy_no prescription…
100 mile diet store…
Buy_generic meds…
list of anti anxiety drugs…
Buy_generic meds…
pain relief until root canal…
Buy_generic meds…
diet generator reviews…
Buy_it now…
glucose to insulin ratio metabolic syndrome…
Buy_drugs without prescription…
psychiatric care model…
Buy_generic meds…
adult male wheezing new onset…
Buy_drugs without prescription…
maple syrup and lemon juice diet…
Buy_it now…
interactions with azithromycin and astragalus…
Buy_it now…
most successful diet ever…
Buy_generic pills…
dog retching vomiting weight loss…
Buy_generic drugs…
sleep apnea side effect of lexapro…
Buy_generic pills…
space herpes…
Buy_now…
remeron dreams…
Buy_it now…
fruity taste and diabetes…
Buy_it now…
children during the depression…
Buy_drugs without prescription…
side@effects.from.the.drug.protonix” rel=”nofollow”>……
Buynow it…
side@effects.of.protonix.after.it.has.been.stopped” rel=”nofollow”>……
Buynow it…
benadryl dogs…
Buy_generic drugs…