@piggly/fastify-chassis
Version:
An ESM/CommonJS toolkit to help you to do common operations in your back-end applications with Fastify and NodeJS.
33 lines • 1.11 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpInsecureServer = 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 HttpInsecureServer 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',
/** @note There is no reason to log with fastify. */
logger: false,
trustProxy: true,
}));
}
}
exports.HttpInsecureServer = HttpInsecureServer;
//# sourceMappingURL=HttpInsecureServer.js.map