Assignments Node VII

Handing In Assignments

You must hand in by using git

Hand In by git

  • Create an empty repo on bitbucket.org, gitlab.com, or github.com,
  • git push your local repo to the above remote repo.
  • For node assignments please put the line(s)

    node_modules/

    into your .gitignore file.

Send a mail to with:

  • The word 'handin <subjectname>' in the subject line of your mail
  • The url of your repo(s).

Assignment Node VII.0

Write a static Express project with a front page, and an about page, both of your own design ie do NOT use the standard Express welcome page. The pages must include some text and an image. Both must have a standard menu giving access to all the pages of the site.

You may use the front page and the about page from your recent project as inspirational content.

Assignment Node VII.1

Write a dynamic Express project with just a front page eg the standard Express welcome page.

In [Wex19] listing 8.2 your friend suggests looking at

console.log(req.params);
console.log(req.body);
console.log(req.url);
console.log(req.query);

Now place these statements in your GET route handler in routes/index.js. Run the application and explain what you see, and what you don't.

Assignment Node VII.2

Research Assignment

In the groups from our recent projects, I want each group to research one of the Express supported templating engines. You must present it, its syntax and semantics in some slides before the class. The practical experiments must be done with the following assignment.

Group I
dust
Group II
EJS
Group III
hbs
Group IV
Pug

For all groups, start your research at Express Template Engines or take a look at the express -h page from the CLI, and search your way from there.

Construction Assignment

Write a dynamic, ie more normal, version of the previous assignment.

The front page and the about page must be written the one Express view engine researched byt the group.

You must make a third page referred to by the route, /continents. That page must treat the contents of the continents module:

/* nml: continents of the world */
"use strict";

module.exports =  {
    "Africa": "Africa",
    "Antarctica": "Antarctica",
    "Asia": "Asia",
    "Europe": "Europe",
    "North America": "North America",
    "Oceania": "Oceania",
    "South America": "South America"
}

as dynamic data. This means feeding these dyanmic data to a page written in your templating engine, rendering it from there. Present it readably, not necessarily artistically.