forked from totaljs/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.js
More file actions
46 lines (34 loc) · 796 Bytes
/
Copy pathdefault.js
File metadata and controls
46 lines (34 loc) · 796 Bytes
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
exports.install = function() {
// IMPORTANT: www. is removed automatically
// add to host:
// 127.0.0.1 website.debug
// 127.0.0.1 subdomain.website.debug
// and run node on 80 port
F.route('[subdomain]/', subdomain);
F.route('/', root);
// 127.0.0.1 subdomain.website.debug
// 127.0.0.1 eshop.website.debug
// 127.0.0.1 blog.website.debug
F.route('[subdomain,eshop,blog]/', subdomain);
// show for all subdomain
F.route('/all/', all);
// hidden for subdomain
F.route('[]/contact/', contact);
// wildcard subdomain routing
F.route('[api*]/', api);
};
function subdomain() {
this.plain('subdomain');
}
function all() {
this.plain('all');
}
function contact() {
this.plain('contact');
}
function root() {
this.plain('root');
}
function api() {
this.plain('api');
}