summaryrefslogtreecommitdiff
path: root/src/node/hooks/express.js
diff options
context:
space:
mode:
authorStefan <mu.stefan@googlemail.com>2015-04-11 12:10:37 +0200
committerStefan <mu.stefan@googlemail.com>2015-04-11 12:10:37 +0200
commitaa0d14c7d71da3d3c4f123e1577848c026bccf0b (patch)
tree19cc760c2aa04ab57eb23e500dc442c0a901a7d1 /src/node/hooks/express.js
parent573a912e4f1b481fca8f3c8146972e78f76278e2 (diff)
parentcc34f4e325830f798321b8152095c4dccd6b465f (diff)
downloadetherpad-lite-aa0d14c7d71da3d3c4f123e1577848c026bccf0b.zip
Merge branch 'master' of git://github.com/ether/etherpad-lite into create_pad_special_characters
Diffstat (limited to 'src/node/hooks/express.js')
-rw-r--r--src/node/hooks/express.js22
1 files changed, 4 insertions, 18 deletions
diff --git a/src/node/hooks/express.js b/src/node/hooks/express.js
index c6573c80..bf849419 100644
--- a/src/node/hooks/express.js
+++ b/src/node/hooks/express.js
@@ -10,24 +10,11 @@ var server;
var serverName;
exports.createServer = function () {
- //try to get the git version
- var version = "";
- try
- {
- var rootPath = path.resolve(npm.dir, '..');
- var ref = fs.readFileSync(rootPath + "/.git/HEAD", "utf-8");
- var refPath = rootPath + "/.git/" + ref.substring(5, ref.indexOf("\n"));
- version = fs.readFileSync(refPath, "utf-8");
- version = version.substring(0, 7);
- console.log("Your Etherpad git version is " + version);
- }
- catch(e)
- {
- console.warn("Can't get git version for server header\n" + e.message)
- }
console.log("Report bugs at https://github.com/ether/etherpad-lite/issues")
- serverName = "Etherpad " + version + " (http://etherpad.org)";
+ serverName = "Etherpad " + settings.getGitCommit() + " (http://etherpad.org)";
+
+ console.log("Your Etherpad version is " + settings.getEpVersion() + " (" + settings.getGitCommit() + ")");
exports.restartServer();
@@ -38,7 +25,6 @@ exports.createServer = function () {
else{
console.warn("Admin username and password not set in settings.json. To access admin please uncomment and edit 'users' in settings.json");
}
-
}
exports.restartServer = function () {
@@ -56,7 +42,7 @@ exports.restartServer = function () {
console.log( "SSL -- server key file: " + settings.ssl.key );
console.log( "SSL -- Certificate Authority's certificate file: " + settings.ssl.cert );
- options = {
+ var options = {
key: fs.readFileSync( settings.ssl.key ),
cert: fs.readFileSync( settings.ssl.cert )
};