1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00

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

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

* Update server.js

* Update listen.js
This commit is contained in:
Arlen22 2018-11-29 17:51:11 +08:00 committed by Jeremy Ruston
parent b18c85b85c
commit 603c564872
3 changed files with 4 additions and 2 deletions

View File

@ -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;
};

View File

@ -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;
};

View File

@ -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.