1 parent 4e66b31 commit a855343Copy full SHA for a855343
2 files changed
controller-transfer/controllers/default.js
@@ -0,0 +1,19 @@
1
+exports.install = function(framework) {
2
+ framework.route('/', view_homepage);
3
+ framework.route('/other/', view_other, ['get']);
4
+ framework.route('/other/', view_other_post, ['post']);
5
+};
6
+
7
+function view_homepage() {
8
+ var self = this;
9
+ if (!self.transfer('/other/', ['post']))
10
+ return self.throw404();
11
+}
12
13
+function view_other() {
14
+ this.plain('OTHER - GET');
15
16
17
+function view_other_post() {
18
+ this.plain('OTHER - POST');
19
controller-transfer/index.js
@@ -0,0 +1,5 @@
+var framework = require('total.js');
+var http = require('http');
+var debug = true;
+framework.run(http, debug);
0 commit comments