8000 new changes · nCodefresh/examples@c3cd274 · GitHub
[go: up one dir, main page]

Skip t 8000 o content

Commit c3cd274

Browse files
committed
new changes
1 parent 302295e commit c3cd274

File tree

78 files changed

+109
-234
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+109
-234
lines changed

routing-flags-roles/definitions/authorization.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ framework.onAuthorization = function(req, res, flags, callback) {
1010

1111
// I add role flag
1212
flags.push('@' + get.user);
13-
1413
callback(true);
1514
}
1615
else

routing-flags/controllers/default.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
exports.install = function(framework) {
22

3-
framework.route('/', view_homepage);
3+
framework.route('/', view_index);
44

55
// [+xhr] - you can execute "view_subpage" with request type: XMLHttpRequest or classic GET/HTTP
66
framework.route('/sub/', view_subpage, ['+xhr']);
@@ -40,7 +40,7 @@ function myflag_example() {
4040
self.view404();
4141
};
4242

43-
function view_homepage() {
43+
function view_index() {
4444
this.plain('GET - homepage');
4545
}
4646

routing-resize/controllers/default.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
framework.route('/', function() {
2-
var self = this;
3-
self.view('homepage');
4-
});
1+
exports.install = function() {
2+
framework.route('/');
3+
};

routing-resize/definitions/resize.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
framework.resize('/img/small/', 100, 100, {}, '/img/');
2-
framework.resize('/img/grayscale/', null, null, { grayscale: true }, '/img/');
2+
framework.resize('/img/grayscale/', null, null, { cache: false, grayscale: true }, '/img/');
33
framework.resize('/img/filters/', null, null, { blur: true, sepia: true, flip: true, flop: true }, '/img/');
44
framework.resize('/img/50percent/', '50%', null, {}, '/img/');
5-
framework.resize('/img/medium/', '70%', null, {}, '/img/', ['.png']);
5+
framework.resize('/img/medium/', '70%', null, {}, '/img/', ['.png']);
File renamed without changes.

routing-timeout/controllers/default.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
exports.install = function(framework) {
2-
3-
// Documentation: http://docs.totaljs.com/Framework/#framework.route
1+
exports.install = function() {
42
framework.route('/', timeout);
5-
63
framework.route('/quick/', timeout, { timeout: 100 });
7-
8-
// Request timeout
9-
framework.route('#408', view_408)
4+
5+
// Request timeout (define timeout page)
6+
framework.route('#408', view_408);
107
}
118

129
function timeout() {
13-
// I forgotten to call a view()
10+
// I forgot to call the view
1411
}
1512

1613
function view_408() {

scheduler/controllers/default.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var counter = 0;
22

3-
exports.install = function(framework) {
4-
framework.route('/', view_homepage);
3+
exports.install = function() {
4+
framework.route('/', plain_index);
55

66
// This event is triggered every 60 seconds.
77

@@ -12,14 +12,12 @@ exports.install = function(framework) {
1212
// or
1313

1414
/*
15-
1615
setInterval(function() {
1716
counter++;
1817
}, 1000);
19-
2018
*/
2119
};
2220

23-
function view_homepage() {
24-
this.plain('Scheduler ran: ' + counter);
21+
function plain_index() {
22+
this.plain('Scheduler run counter: ' + counter);
2523
}

server-sent-events/controllers/default.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
1-
exports.install = function(framework) {
2-
framework.route('/', view_homepage);
1+
exports.install = function() {
2+
framework.route('/');
33
framework.route('/one-way-messaging/', view_SSE, ['sse']);
44
};
55

6-
function view_homepage() {
7-
var self = this;
8-
self.view('homepage');
9-
}
10-
116
function view_SSE() {
127

138
var self = this;

session-cluster-redis/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ for (var i = 0; i < numCPUs; i++) {
3333
fork.send({ type: 'id', id: i });
3434
}
3535

36-
console.log('Cluster is running.');
36+
console.log('The cluster is running.');
3737

3838
function onMessage(message) {
3939
console.log('Message ->', message);

0 commit comments

Comments
 (0)
0