WebFund 2016W: Tutorial 4

From Soma-notes
Revision as of 14:55, 2 February 2016 by Soma (talk | contribs) (→‎Tasks)
Jump to navigation Jump to search

This tutorial is still a work in progress.

In this tutorial you will be working with examforms, a streamlined version of form-demo that will be the focus of the midterm.

After unpacking, you start examforms.js by running "node examforms.js".

Tasks

Make the following changes to examforms:

  1. Make it so that typing "PORT=7000 node examforms.js" causes it to listen on port 7000.
  2. Fix stylesheet loading. (Currently the browser will request the stylesheet but the server responds with 404.)
  3. Add a Phone number field to the program.
  4. Make the text bigger.
  5. Add an image to /. The image should be loaded from the server.
  6. Change /list to show the list sorted by name.
  7. Create a /delete page that asks for a name to delete. It then POSTs to /deleted which confirms that the name was deleted. This page has a button to go back Home.
  8. Make the server save the entered names to a file when the server is terminated by a Ctrl-C and load those names when the server is restarted.

Code