Open benholland1024 opened 1 year ago
When server.js
recieves a new HTTP request, here's what might happen:
The list above is memorizable.
There are some other functions that need to be added, to "factor out" functionality of the list's functions. For example, inserting a page into index.html, or responding to a API request.
It's always going to take some time to describe.
The goal is a description that makes sense consistently and efficiently. (And code that works!)
This issue deals with human cognition as much as code style probably.
What makes code easy to describe & memorize?
Good documentation
The file
server.js
is first created in v1 part A, just to serve static files and assets. The finalserver.js
has the following duties:/register
or/
/logo.png
or/fonts/CrimsonText.ttf
/lessons/woodworking/1
, and private, like/ben/secrets
/ben/circularsaw.png
, and private like/ben/passwords.txt