CSCI4208 - Advanced Web Applications.
Lab 8: Node + NPM - Static Web Server
Concepts: Node, NPM, package.json, Modules: http, fs, url, path
0. Lab Introduction
Define Web Server, Node, NPM
1. Web Server deployed with Node
Sends "Hello World" response, deployed with Node
2. Web Server deployed with NPM
Sends "Hello World" response, deployed with NPM
3. HTML filename from URL path
Parse HTML filename from URL path of HTTP Request
4. Respond with 404 errors
Response to all request with 404 errors: file not found
5. Respond with 200 success
Response to a successful request with code 200
6. Serve HTML file to Browser
Serve the requested HTML file to Browser
7. Redirect '/' to '/index.html'
Redirect GET '/' Request to Response for '/index.html'
8. Internal Server Error: 500
Error if cannot serve File or Directory but it Exists
9. Concluding Notes
Summary and Submission notes