Start of ESM update

This commit is contained in:
Allan Carr
2024-07-24 08:54:29 -07:00
parent 58055fd1b3
commit e793402a79
14 changed files with 107 additions and 171 deletions

View File

@@ -1,5 +1,5 @@
import fs = require("fs-extra");
import dotenv from "dotenv";
import { ensureDirSync } from "fs-extra";
import os from "os";
import path, { resolve } from "path";
import { logger } from "../server";
@@ -36,11 +36,11 @@ export function BillsRelativeFilePath(jobid: string, filename: string) {
}
export default function InitServer() {
logger.info(`Ensuring Root media path exists: ${FolderPaths.Root}`);
fs.ensureDirSync(FolderPaths.Root);
ensureDirSync(FolderPaths.Root);
logger.info(`Ensuring Jobs media path exists: ${FolderPaths.Jobs}`);
fs.ensureDirSync(FolderPaths.Jobs);
ensureDirSync(FolderPaths.Jobs);
logger.info(`Ensuring Vendors media path exists: ${FolderPaths.Vendors}`);
fs.ensureDirSync(FolderPaths.Vendors);
ensureDirSync(FolderPaths.Vendors);
logger.info("Folder Paths", FolderPaths);
logger.info("IMS Token set to: " + (process.env.IMS_TOKEN || "").trim());
}