yvettecook / NodeBeginner

Refreshing Node Knowledge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Context

Working through the Node Beginner ebook/tutorial.

Spec

  • The user should be able to use the application with a web browser
  • The user should see a welcome page
  • The welcome pahe displays a file upload form
  • By choosing an image file to upload, and submitting the form, the image should be uploaded, and displayed

Process

What does the application need to consist of?

  • HTTP server, to serve webpages
  • Router, to map requests to request handlers
  • Request handlers to fulfil the requests
  • Request data handling, to respond incoming to POST data
  • View logic, to display content for GET requests
  • Upload handling, to do exactly that

Steps

  1. server.js

Learning

Clean code:

  • Put different concerns in modules
  • Loosely couple server and route by injecting dependency

Further Reading

About

Refreshing Node Knowledge


Languages

Language:JavaScript 100.0%