-
Notifications
You must be signed in to change notification settings - Fork 7
/
playserver.js
33 lines (31 loc) · 1.16 KB
/
playserver.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
// make it possible to run the project
var eejs = require('ep_etherpad-lite/node/eejs');
var settings = require('ep_etherpad-lite/node/utils/Settings');
// /play page should run the code, and display contents.
exports.expressCreatePlayServer = function(hook_name, args, cb) {
args.app.get('/play', function(req, res) {
res.send(eejs.require("ep_codepad/templates/simple_error.html", {
error: "Disabled"
}));
});
/*
args.app.get('/play', function(req, res) {
if (!settings.ep_codepad) {
console.log("Codepad needs ep_codepad parameters in settings.json.");
res.send(eejs.require("ep_codepad/templates/no_play_url.html", {
url: ""
}));
} else {
if (!settings.ep_codepad.play_url) {
console.log("No ep_codepad.play_url set in settings.json.");
res.send(eejs.require("ep_codepad/templates/no_play_url.html", {
url: ""
}));
} else res.send(eejs.require("ep_codepad/templates/redirect.html", {
url: settings.ep_codepad.play_url
}));
}
});
*/
};
//