new env var
This commit is contained in:
parent
740caf1df4
commit
040f931745
1 changed files with 2 additions and 2 deletions
|
@ -28,7 +28,7 @@ const uptimeObject: Map<string, UptimeEntry[]> = loadUptimeObject();
|
|||
export{ uptimeObject as uptime };
|
||||
|
||||
function loadUptimeObject(): Map<string, UptimeEntry[]>{
|
||||
const filePath = path.join(__dirname, "..", "uptime.json");
|
||||
const filePath = process.env.UPTIMEJSON||path.join(__dirname, "..", "uptime.json");
|
||||
if(fs.existsSync(filePath)){
|
||||
try{
|
||||
const data = JSON.parse(fs.readFileSync(filePath, "utf8"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue