diff --git a/core/modules/commands/listen.js b/core/modules/commands/listen.js index dd22ea940..3c5f6a63a 100644 --- a/core/modules/commands/listen.js +++ b/core/modules/commands/listen.js @@ -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; }; diff --git a/core/modules/commands/server.js b/core/modules/commands/server.js index fd1e4ea50..507d1281d 100644 --- a/core/modules/commands/server.js +++ b/core/modules/commands/server.js @@ -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; }; diff --git a/editions/dev/tiddlers/new/Hook__th-server-command-post-start.tid b/editions/dev/tiddlers/new/Hook__th-server-command-post-start.tid index cd30b42b1..4b42b4e35 100644 --- a/editions/dev/tiddlers/new/Hook__th-server-command-post-start.tid +++ b/editions/dev/tiddlers/new/Hook__th-server-command-post-start.tid @@ -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.