node-framework
Version:
node-framework
35 lines (26 loc) • 594 B
JavaScript
/**
* @file user ~ 2014-08-17 12:09
* @author sekiyika (px.pengxing@gmail.com)
* @description
*
*/
module.exports = {
hello: function (req, res) {
res.send('hello');
},
view: function (req, res) {
req.session.view ++;
setTimeout(function () {
// throw new Error('artificial');
res.render('test', {
name: 'pengxing'
});
});
console.log(req.session.view);
},
sendfile: function (req, res) {
res.sendfile('/logger.js', {
root: '/'
});
}
};