UNPKG

@piggly/fastify-chassis

Version:

An ESM/CommonJS toolkit to help you to do common operations in your back-end applications with Fastify and NodeJS.

29 lines 874 B
import fastify from 'fastify'; import { AbstractServer } from '../../www/fastify/AbstractServer.js'; /** * @file The API server. * @copyright Piggly Lab 2023 */ export class Http2InsecureServer extends AbstractServer { /** * Create a new API server. * * @param options The options. * @public * @constructor * @memberof ApiServer * @since 1.0.0 * @since 7.2.1 Disable fastify logs. * @author Caique Araujo <caique@piggly.com.br> */ constructor(options, fastifyOptions) { super(options, fastify(fastifyOptions || { disableRequestLogging: options.env.environment === 'production', http2: true, /** @note There is no reason to log with fastify. */ logger: false, trustProxy: true, })); } } //# sourceMappingURL=Http2InsecureServer.js.map