Skip to content

Commit

Permalink
feat: add onListen hook (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Eomm authored Nov 5, 2023
1 parent 54710cb commit a1f69fa
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions snippets/snippets-js.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
13 changes: 13 additions & 0 deletions snippets/snippets-ts.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit a1f69fa

Please sign in to comment.