Skip to content

Latest commit

 

History

History
44 lines (27 loc) · 914 Bytes

File metadata and controls

44 lines (27 loc) · 914 Bytes

Chapter 2 Examples - Web Development with Node and Express, 2nd Edition

Hello World

Demonstrates a classic, minimal Node application. Express is nowhere to be found in these examples...this gives you a glimpse at what life would be like without Express!

Example 0

Minimal example; doesn't do very much. To run:

node 00-helloworld

Then visit http://localhost:3000 in your browser.

Example 1

This adds really basic routing.

node 01-helloworld

Then try the following URLs:

Example 2

This example demonstrates a web server that serves static files, in the form of HTML files (in public) and PNG image files (in public/img).

node 02-helloworld

Then try the following URLs: