Add the "tiddlywiki" argument to the server start hook (#3592)

* Update Hook__th-server-command-post-start.tid

* Update server.js

* Update listen.js
logging-improvements
Arlen22 2018-11-29 17:51:11 +08:00 zatwierdzone przez Jeremy Ruston
rodzic b18c85b85c
commit 603c564872
3 zmienionych plików z 4 dodań i 2 usunięć

Wyświetl plik

@ -39,7 +39,7 @@ Command.prototype.execute = function() {
variables: self.params
});
var nodeServer = this.server.listen();
$tw.hooks.invokeHook("th-server-command-post-start",this.server,nodeServer);
$tw.hooks.invokeHook("th-server-command-post-start",this.server,nodeServer,"tiddlywiki");
return null;
};

Wyświetl plik

@ -46,7 +46,7 @@ Command.prototype.execute = function() {
}
});
var nodeServer = this.server.listen();
$tw.hooks.invokeHook("th-server-command-post-start",this.server,nodeServer);
$tw.hooks.invokeHook("th-server-command-post-start",this.server,nodeServer,"tiddlywiki");
return null;
};

Wyświetl plik

@ -14,5 +14,7 @@ Hook function parameters:
** Defined in core/modules/commands/server.js
* NodeJS HTTP Server instance
** See the NodeJS docs at [ext[https://nodejs.org/docs/latest-v8.x/api/http.html#http_class_http_server]]
* Name of server invoking this hook (for special handling of the NodeJS HTTP server instance argument).
** Current known values: `tiddlywiki`, `tiddlyserver`.
Return value is ignored.