Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 979 Bytes

Readme.md

File metadata and controls

24 lines (17 loc) · 979 Bytes

Some people on our team wanted a quick intro to NodeJS and the advantages and use cases for it. I've mostly used it for simple scripts and http utilties, but I built these examples for us to walkthrough in about an hour. This was also an introduction to event driven programming and the callback patterns in node.

I. What is nodejs

II. Simple hello world from nodejs.org (helloworld.js)

III. Extended example showing in memory data structures and variables to count the number of connections that have hit the node server. (counter.js)

IV. Simple text proxy showing more of the http module and events attached to the request object and their anonymous callbacks. (proxy.js)

V. Next we walked through NPM and how to get it installed npmjs.org, then installing jsdom with npm install jsdom

VI. Web scraper using JSDOM a 3rd party library and nested callbacks and event handlers to extract a portion of html from a remote server using http get and the DOM API. (scraper.js)