Function: createServer

createServer(config): Promise<{ instance: FastifyInstance<Server, IncomingMessage, ServerResponse, FastifyLoggerInstance> & PromiseLike<FastifyInstance<Server, IncomingMessage, ServerResponse, FastifyLoggerInstance>> ; start: () => Promise<void> ; stop: () => Promise<void> }>

Create instance of development server, powered by Fastify.

Parameters

Name Type Description
config Config Server configuration.

Returns

Promise<{ instance: FastifyInstance<Server, IncomingMessage, ServerResponse, FastifyLoggerInstance> & PromiseLike<FastifyInstance<Server, IncomingMessage, ServerResponse, FastifyLoggerInstance>> ; start: () => Promise<void> ; stop: () => Promise<void> }>

start and stop functions as well as an underlying Fastify instance.

Defined in

createServer.ts:21