Files
ProxmoxAAS-LDAP/src/utils.js
2024-01-12 01:48:34 +00:00

13 lines
235 B
JavaScript

import { readFileSync } from "fs";
import { exit } from "process";
export function readJSONFile (path) {
try {
return JSON.parse(readFileSync(path));
}
catch (e) {
console.log(`error: ${path} was not found.`);
exit(1);
}
};