-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstallHandlers.js
52 lines (52 loc) · 1.22 KB
/
installHandlers.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
module.exports = {
name: "InstallHandlers",
ns: "sockjs",
description: "SockJS Install Handlers",
phrases: {
active: "Installing Handlers"
},
ports: {
input: {
server: {
type: "Server",
title: "SockJS server",
required: true,
description: "SockJS Server"
},
http: {
type: "Server",
title: "HTTP server",
required: true,
description: "Node.js HTTP Server"
},
prefix: {
type: "string",
title: "Prefix",
description: "A url prefix for the server. All http requests which paths begins with selected prefix will be handled by SockJS. All other requests will be passed through, to previously registered handlers."
}
},
output: {
server: {
type: "Server",
title: "SockJS server",
description: "SockJS Server"
}
}
},
fn: function InstallHandlers(input, $, output, state, done, cb, on) {
var r = function() {
$.server.installHandlers($.http, {
prefix: $.prefix
});
output = {
server: $.create($.server)
};
}.call(this);
return {
output: output,
state: state,
on: on,
return: r
};
}
}