Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add onListen hook #18

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading