-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathrouterServer.js
50 lines (48 loc) · 1.55 KB
/
routerServer.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
/* KRAMERIUS */
Router.route('digital-library-acho', {
where: 'server',
action: function () {
this.response.statusCode = 200;
this.response.setHeader("Content-Type", "application/acho");
this.response.end(`host: digitalniknihovna.mzk.cz\nlang: cs`);
},
i18n: {
languages: {
en: {
action: function () {
this.response.statusCode = 200;
this.response.setHeader("Content-Type", "application/acho");
this.response.end(`host: digitalniknihovna.mzk.cz\nlang: en`);
}
}
}
}
});
/* WEBARCHIV */
Router.route('webarchiv-acho', {
where: 'server',
action: function () {
this.response.statusCode = 200;
this.response.setHeader("Content-Type", "application/acho");
this.response.end(`host: webarchiv.cz\nlang: cs`);
},
i18n: {
languages: {
en: {
action: function () {
this.response.statusCode = 200;
this.response.setHeader("Content-Type", "application/acho");
this.response.end(`host: webarchiv.cz\nlang: en\n`);
}
}
}
}
});
Router.route('/kramerius-acho/:host/:lang/:uuid', {
where: 'server',
action: function () {
this.response.statusCode = 200;
this.response.setHeader("Content-Type", "application/acho");
this.response.end(`host: ${this.params.host}\nlang: ${this.params.lang}\npid: ${this.params.uuid}`);
}
});