UNPKG
@fastify/autoload
Version:
latest (6.4.0)
next (6.0.0)
6.4.0
6.3.1
6.3.0
6.2.0
6.1.0
6.0.3
6.0.2
6.0.1
6.0.0
6.0.0-pre.fv5.1
5.10.0
5.9.0
5.8.3
5.8.2
5.8.1
5.8.0
5.7.2
5.7.1
5.7.0
5.6.0
5.5.0
5.4.1
5.4.0
5.3.1
5.3.0
5.2.0
5.1.0
5.0.0
4.0.1
4.0.0
Require all plugins in a directory
github.com/fastify/fastify-autoload
fastify/fastify-autoload
@fastify/autoload
/
test
/
typescript-jest
/
basic
/
foo
/
typescript.ts
12 lines
(8 loc)
•
260 B
text/typescript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
import
{
FastifyPluginCallback
}
from
'fastify'
const
plugin
:
FastifyPluginCallback
=
function
(
fastify, _opts, next
):
void
{ fastify.
get
(
'/typescript'
, (_request, reply):
void
=>
{ reply.
send
({
script
:
'type'
}) })
next
() }
export
default
plugin