Documents for @litert/xxl-job-integration / Listener/Fastify / create
Function: create()
create(
executor
,listenOpts
,fastifyOpts
):Promise
<FastifyInstance
<RawServerDefault
,IncomingMessage
,ServerResponse
<IncomingMessage
>,FastifyBaseLogger
,FastifyTypeProviderDefault
>>
Defined in: src/lib/Listener/Fastify.ts:231
Create a new fastify instance and bind the XXL-Job executor API to it.
To use this listener, you need to install the
fastify
package:
Parameters
executor
The XXL-Job executor instance to handle the API requests.
listenOpts
FastifyListenOptions
The options for the Fastify server to listen on.
fastifyOpts
FastifyServerOptions
= ...
The options for the Fastify server instance.
Returns
Promise
<FastifyInstance
<RawServerDefault
, IncomingMessage
, ServerResponse
<IncomingMessage
>, FastifyBaseLogger
, FastifyTypeProviderDefault
>>
The created Fastify instance.