equal
deleted
inserted
replaced
22 return 0 |
22 return 0 |
23 } |
23 } |
24 } |
24 } |
25 |
25 |
26 app.get('/', function(req, res){ |
26 app.get('/', function(req, res){ |
27 var counter = gt_cookie(req.cookies.counter) || 0; |
27 var counter = gt_cookie(req.cookies.counter || "") || 0; |
28 res.cookie('counter', mk_cookie(counter + 1)); |
28 res.cookie('counter', mk_cookie(counter + 1)); |
29 if (counter >= 5) { |
29 if (counter >= 5) { |
30 res.write('You are a valued customer ' + |
30 res.write('You are a valued customer ' + |
31 'visting the site ' + counter + ' times.'); |
31 'visting the site ' + counter + ' times.'); |
32 } else { |
32 } else { |