diff --git a/README.md b/README.md index eaba229..69b1ca8 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ fastify hook onSend|Add an instance fastify onSend hook|ffonsend, hookonsend fastify hook onResponse|Add an instance fastify onResponse hook|ffonresponse, hookonresponse fastify hook onTimeout|Add an instance fastify onTimeout hook|ffontimeout, hookontimeout fastify application hook onReady|Add the fastify onReady application hook|ffonready, hookonready +fastify application hook onListen|Add the fastify onListen application hook|ffonlisten, hookonlisten fastify application hook preClose|Add the fastify preClose application hook|ffpreclose, hookpreclose fastify application hook onClose|Add the fastify onClose application hook|ffonclose, hookonclose fastify application hook onRoute|Add the fastify onRoute application hook|ffonroute, hookonroute diff --git a/snippets/snippets-js.json b/snippets/snippets-js.json index f567c47..b32bbc7 100644 --- a/snippets/snippets-js.json +++ b/snippets/snippets-js.json @@ -234,6 +234,19 @@ ], "description": "Add the fastify onReady application hook" }, + "fastify application hook onListen": { + "scope": "javascript,typescript", + "prefix": [ + "ffonlisten", + "hookonlisten" + ], + "body": [ + "app.addHook('onListen', async function hook () {", + "", + "})" + ], + "description": "Add the fastify onListen application hook" + }, "fastify application hook preClose": { "scope": "javascript,typescript", "prefix": [ diff --git a/snippets/snippets-ts.json b/snippets/snippets-ts.json index e074d10..13befe8 100644 --- a/snippets/snippets-ts.json +++ b/snippets/snippets-ts.json @@ -183,6 +183,19 @@ "body": ["app.addHook('onReady', async function hook () {", "", "})"], "description": "Add the fastify onReady application hook" }, + "fastify application hook onListen": { + "scope": "typescript", + "prefix": [ + "ffonlisten", + "hookonlisten" + ], + "body": [ + "app.addHook('onListen', async function hook () {", + "", + "})" + ], + "description": "Add the fastify onListen application hook" + }, "fastify application hook preClose": { "scope": "typescript", "prefix": ["ffpreclose", "hookpreclose"],