Week 2: Simple Express App

This week we set up a server with the Express library and learned different strategies to serve up content to requests. I made a very simple form that saves submitted strings into an array and dynamically displays them with varying font sizes at every run. It’s not fancy in the least, but my main goal to was understand the backend programming style, vocabulary, and syntax to make this possible (including getting used to anonymous functions). ITP resident Marthura did help me link a very basic style sheet into my server file to style routes for /formpost and /display. 

Of note, data is only stored if the server is running; the array clears when its not. As I did for last week’s exercise, I initiated the forever module to display the assignment during the semester. 

Here it is (for now): onomatopoeia 

Code on GitHub