--- a/progs/App3.js Sun Sep 24 18:03:21 2017 +0100
+++ b/progs/App3.js Mon Sep 25 17:16:56 2017 +0100
@@ -24,7 +24,7 @@
}
app.get('/', function(req, res){
- var counter = gt_cookie(req.cookies.counter) || 0;
+ var counter = gt_cookie(req.cookies.counter || "") || 0;
res.cookie('counter', mk_cookie(counter + 1));
if (counter >= 5) {
res.write('You are a valued customer ' +
--- a/progs/App4.js Sun Sep 24 18:03:21 2017 +0100
+++ b/progs/App4.js Mon Sep 25 17:16:56 2017 +0100
@@ -27,7 +27,7 @@
}
app.get('/', function(req, res){
- var counter = gt_cookie(req.cookies.counter) || 0;
+ var counter = gt_cookie(req.cookies.counter || "") || 0;
res.cookie('counter', mk_cookie(counter + 1));
if (counter >= 5) {
res.write('You are a valued customer ' +
Binary file slides/slides01.pdf has changed
Binary file slides/slides02.pdf has changed
Binary file slides/slides03.pdf has changed
Binary file slides/slides04.pdf has changed
Binary file slides/slides05.pdf has changed
Binary file slides/slides06.pdf has changed
Binary file slides/slides07.pdf has changed
Binary file slides/slides08.pdf has changed
Binary file slides/slides09.pdf has changed