consolidate package and config import,
fix ldap auth template, add start script and systemd service
This commit is contained in:
12
src/utils.js
Normal file
12
src/utils.js
Normal file
@@ -0,0 +1,12 @@
|
||||
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);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user