progs/ap3.js
changeset 531 35ffb7a7eafa
parent 166 bba0504abcf0
equal deleted inserted replaced
530:6e08ee0d399d 531:35ffb7a7eafa
    13         return counter
    13         return counter
    14     } else { return 0 }
    14     } else { return 0 }
    15 }
    15 }
    16 
    16 
    17 app.get('/', function(req, res){
    17 app.get('/', function(req, res){
    18     var counter = gt_cookie(req.cookies.counter) || 0;
    18     var counter = gt_cookie(req.cookies.counter || "") || 0;
    19     res.cookie('counter', mk_cookie(counter + 1));
    19     res.cookie('counter', mk_cookie(counter + 1));
    20     ...
    20     ...
    21 });
    21 });
    22