Expose server instance in action hook 'server.start' (#9616)

* Expose server instance in action hook 'server.start'

* Expose server in start/stop

* Update documentation
This commit is contained in:
gkielwasser
2021-11-09 17:28:24 +01:00
committed by GitHub
parent ad3a503f25
commit 053d2a6a37
2 changed files with 4 additions and 4 deletions

View File

@@ -106,7 +106,7 @@ export async function createServer(): Promise<http.Server> {
async function onShutdown() {
emitter.emitAction(
'server.stop',
{},
{ server },
{
database: getDatabase(),
schema: null,
@@ -141,7 +141,7 @@ export async function startServer(): Promise<void> {
emitter.emitAction(
'server.start',
{},
{ server },
{
database: getDatabase(),
schema: null,