@hashgraph/hedera-local
Version:
Developer tooling for running Local Hedera Network (Consensus + Mirror Nodes).
26 lines • 1.02 kB
JavaScript
;
// SPDX-License-Identifier: Apache-2.0
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = readApplicationYML;
const path_1 = require("path");
const js_yaml_1 = __importDefault(require("js-yaml"));
const fs_1 = require("fs");
const constants_1 = require("../constants");
/**
* Reads the application.yml file and returns its content and path.
*
* @public
* @returns {{propertiesFilePath: string, application: any}} An object containing the path of the application.yml file and its content.
*/
function readApplicationYML() {
const propertiesFilePath = (0, path_1.join)(__dirname, constants_1.APPLICATION_YML_RELATIVE_PATH);
const application = js_yaml_1.default.load((0, fs_1.readFileSync)(propertiesFilePath).toString());
return {
propertiesFilePath,
application
};
}
//# sourceMappingURL=config.js.map