Rainbow the logs

This commit is contained in:
uurgothat
2021-10-04 22:01:08 +03:00
parent e52e7ef0e1
commit d4ddf3acf0
9 changed files with 46 additions and 28 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import { FileStorage } from "./FileStorage";
import path from "path";
import fse from "fs-extra";
import { bgCyan, black } from "chalk";
process.cwd();
export interface Storage {
@@ -18,7 +19,7 @@ if (process.env.STORAGE_PROVIDER === "file" || !process.env.STORAGE_PROVIDER) {
} else {
location = path.join(process.cwd(), "files");
}
console.log(`[CDN] storage location: ${location}`);
console.log(`[CDN] storage location: ${bgCyan(`${black(location)}`)}`);
fse.ensureDirSync(location);
process.env.STORAGE_LOCATION = location;