Closed leizongmin closed 13 years ago
测试代码:
var web = require('webjs'); var get = { '/': function (req, res) { // 开启session req.sessionStart(); // 计数器,用于测试Session数据 if (isNaN(req.session.count)) req.session.count = 0; req.session.count ++; res.end('session id=' + req.session_id + '\r\ncount=' + req.session.count); }, 'end': function (req, res) { // 清空session req.sessionEnd(); res.end('session end.'); } } web.run() .get(get);
Thanks~
测试代码: