Skip to content

wavetossed/node-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

just some examples of node.js apps to demonstrate features

hello world example

I didn't like the standard node.js hello world example so I expanded on it to show a few more features. I also added a number of comments to explain the code.

  • webs.js is the fully commented version of the code for a simple webserver that collects some info, reads a file, builds a web page and then serves that page to any browser who makes a request. It shows a bit of the async nature of node.js and shows how first class functions are important.
  • websunc.js is the same code with all comments stripped. It is good for displaying in a blog where the blog article does the explaining rather than the code comments.
  • sample.txt is just a text file which is read in and included in the web page. The purpose of this is to show how non-blocking file io is done.

About

node.js examples

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published