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.

34 lines 1.14 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Http2InsecureServer = void 0; const tslib_1 = require("tslib"); const fastify_1 = tslib_1.__importDefault(require("fastify")); const AbstractServer_js_1 = require("../../www/fastify/AbstractServer.js"); /** * @file The API server. * @copyright Piggly Lab 2023 */ class Http2InsecureServer extends AbstractServer_js_1.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, (0, fastify_1.default)(fastifyOptions || { disableRequestLogging: options.env.environment === 'production', http2: true, /** @note There is no reason to log with fastify. */ logger: false, trustProxy: true, })); } } exports.Http2InsecureServer = Http2InsecureServer; //# sourceMappingURL=Http2InsecureServer.js.map