Skip to content

fastify/fastify-snippet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastify-snippets

The official Fastify VSCode snippets!

Install it from the VSCode marketplace!

For more information, take a look a the VSCode documentation

Snippet list

Snippet Description Type
fastify hello server Create an hello world server ffhello
fastify register Add an empty plugin ffregister, ffplugin
fastify print routes Print to stdout the routes tree ffprintroutes
fastify error handler Add a custom error handler fferrorhandler
fastify decorate server Add a server decorator ffdecorateserver
fastify decorate request Add a request decorator ffdecoraterequest
fastify decorate reply Add a reply decorator ffdecoratereply
fastify hook onRequest Add an instance fastify onRequest hook ffonrequest, hookonrequest
fastify hook preParsing Add an instance fastify preParsing hook ffpreparsing, hookpreparsing
fastify hook preValidation Add an instance fastify preValidation hook ffprevalidation, hookprevalidation
fastify hook preHandler Add an instance fastify preHandler hook ffprehandler, hookprehandler
fastify hook preSerialization Add an instance fastify preSerialization hook ffpreserialization, hookpreserialization
fastify hook onError Add an instance fastify onError hook ffonerror, hookonerror
fastify hook onRequestAbort Add an instance fastify onRequestAbort hook ffonrequestabort, hookonrequestabort
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
fastify application hook onRegister Add the fastify onRegister application hook ffonregister, hookonregister
fastify add schema Add a shared JSON schema to fastify ffaddschema, ffsharedschema, ffjsonschema, ffschema
fastify not found handler Add the default 404 not found handler ffnotfound, ff404

Contribute

Feel free to open an issue if you have suggestion o new ideas to improve this snippet!

How to test

From VSCODE you can run the Extension launcher to test your snippet inside an headless VSCODE instance.

How to release

First, you must be added into the Fastify publisher to complete succesfully these steps.

  • Access to the Fastify org on Azure
  • Generate a personal access token (check the show all scope small button-link)
  • Run npm run vscode:login
  • Manually bump the version in the package.json
  • Run npm run vscode:pack
  • Run npm run vscode:publish
  • Commit&Push the new version to the main branch

Releases

No releases published

Contributors 4

  •  
  •  
  •  
  •