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.

38 lines 1.29 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Http2SecureServer = void 0; const tslib_1 = require("tslib"); const fastify_1 = tslib_1.__importDefault(require("fastify")); const AbstractServer_1 = require("./AbstractServer.js"); /** * @file The API server. * @copyright Piggly Lab 2023 */ class Http2SecureServer extends AbstractServer_1.AbstractServer { /** * Create a new API server. * * @param options The options. * @public * @constructor * @memberof ApiServer * @since 1.0.0 * @author Caique Araujo <caique@piggly.com.br> */ constructor(options, ssl, fastifyOptions) { super(options, (0, fastify_1.default)(fastifyOptions || { disableRequestLogging: options.env.environment === 'production', http2: true, https: { allowHTTP1: true, cert: ssl.cert, key: ssl.key, }, logger: options.fastify.logger || AbstractServer_1.AbstractServer.defaultLogger(options.env.environment, options.env.app.root_path, options.env.debug), trustProxy: true, })); } } exports.Http2SecureServer = Http2SecureServer; //# sourceMappingURL=Http2SecureServer.js.map