Add logging, pdf thumbs

This commit is contained in:
Patrick Fic
2022-05-03 15:26:14 -07:00
parent cb046f813b
commit 8d851c52b2
10 changed files with 3141 additions and 1568 deletions

View File

@@ -2,6 +2,7 @@ import fs = require("fs-extra");
import path, { resolve } from "path";
import dotenv from "dotenv";
import os from "os";
import { logger } from "../server";
dotenv.config({
path: resolve(process.cwd(), `.env.${process.env.NODE_ENV || "development"}`),
@@ -21,10 +22,11 @@ export const FolderPaths = {
};
export default function InitServer() {
console.log(`Ensuring Root media path exists: ${FolderPaths.Root}`);
logger.info(`Ensuring Root media path exists: ${FolderPaths.Root}`);
fs.ensureDirSync(FolderPaths.Root);
console.log(`Ensuring Jobs media path exists: ${FolderPaths.Jobs}`);
logger.info(`Ensuring Jobs media path exists: ${FolderPaths.Jobs}`);
fs.ensureDirSync(FolderPaths.Jobs);
console.log(`Ensuring Vendors media path exists: ${FolderPaths.Vendors}`);
logger.info(`Ensuring Vendors media path exists: ${FolderPaths.Vendors}`);
fs.ensureDirSync(FolderPaths.Vendors);
logger.info("Folder Paths", FolderPaths);
}