WebFund 2013W Lecture 10: Difference between revisions

From Soma-notes
No edit summary
 
Line 7: Line 7:
* Install [http://expressjs.com/ express], generally by running <tt>npm install express -g</tt>.
* Install [http://expressjs.com/ express], generally by running <tt>npm install express -g</tt>.
* <tt>unzip [http://homeostasis.scs.carleton.ca/~soma/webfund-2013w/jquery-ui-express.zip jquery-ui-express.zip]</tt>
* <tt>unzip [http://homeostasis.scs.carleton.ca/~soma/webfund-2013w/jquery-ui-express.zip jquery-ui-express.zip]</tt>
* <tt>cd jquery-ui-express; npm install</tt>  (to get the correct <tt>node_modules</tt> directory set up.
* <tt>cd jquery-ui-express; npm install</tt>  (to get the correct <tt>node_modules</tt> directory set up)
* <tt>node app.js</tt>
* <tt>node app.js</tt>



Latest revision as of 20:38, 7 February 2013

Lecture

Audio from the lecture given on February 7, 2013 is here.

Also, here is jquery-ui-express, the example discussed in class. To run this code you will need to:

  • Install node and npm. Note this example was developed with version 0.8.19.
  • Install express, generally by running npm install express -g.
  • unzip jquery-ui-express.zip
  • cd jquery-ui-express; npm install (to get the correct node_modules directory set up)
  • node app.js

This example is a node port of the standalone html demo demo-jquery-ui covered in last week's tutorial.

Questions

  1. Express gives you a static file server by default. (true/false)
  2. In express, URLs are all automatically resolved by looking for the appropriately named file. (true/false)
  3. In node, modules declare public functions by assigning them to which object?
  4. Jade templates only allow you to access a restricted subset of HTML. (true/false)
  5. In an HTML form, if I want to return a value called "country", which parameter do I set to "country": id, name, class, for, or type?