1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-10-27 13:47:40 +00:00

Server command: support environment variables for specifying port number

This commit is contained in:
Jermolene
2018-03-28 11:58:46 +01:00
parent be375c40f2
commit f4fd5e76f8
2 changed files with 9 additions and 2 deletions

View File

@@ -291,6 +291,9 @@ Command.prototype.execute = function() {
password = this.params[5],
host = this.params[6] || "127.0.0.1",
pathprefix = this.params[7];
if(parseInt(port,10).toString() !== port) {
port = process.env[port] || 8080;
}
this.server.set({
rootTiddler: rootTiddler,
renderType: renderType,