File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -38,9 +38,14 @@ import Fastify from 'fastify'
3838import enforceSchema from ' fastify-enforce-schema'
3939
4040const fastify = Fastify ()
41+
42+ // Register the plugin
4143await fastify .register (enforceSchema, {
42- // options
44+ // options (described below)
4345})
46+
47+ // Register your routes
48+ // your route definitions here...
4449```
4550> _ Note_ : top-level await requires Node.js 14.8.0 or later
4651
@@ -49,9 +54,12 @@ await fastify.register(enforceSchema, {
4954const fastify = require (' fastify' )()
5055const enforceSchema = require (' fastify-enforce-schema' )
5156
57+ // Register the plugin
5258fastify .register (enforceSchema, {
5359 // options (described below)
5460})
61+
62+ // Register your routes
5563fastify .register ((fastify , options , done ) => {
5664 // your route definitions here...
5765
You can’t perform that action at this time.
0 commit comments