1234567891011121314151617181920212223242526272829 |
- "use strict";
- var Controller = require('./../framework/Controller.js');
- class DefaultController extends Controller {
- //var i = 0;
- constructor(req, res) {
- super(req, res);
- this.i = 0;
- }
- actionIndex(args) {
- var title = args['title'] || 'Hello';
- this.assign('title', title);
- this.display('index');
- }
- actionTest(args) {
- this._res.write(this.i++ + "");
- this._res.end();
- }
- actionWs(args) {
- this.display('ws');
- }
- }
- module.exports = DefaultController;
|