From 1350f2cbac9b761a247fd4c01d0eca4d98b2247c Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Fri, 3 Sep 2021 04:02:21 +0200 Subject: :bug: fix #289 --- cdn/src/start.ts | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'cdn/src/start.ts') diff --git a/cdn/src/start.ts b/cdn/src/start.ts index 2a449130..71681b40 100644 --- a/cdn/src/start.ts +++ b/cdn/src/start.ts @@ -1,21 +1,6 @@ -import path from "path"; import dotenv from "dotenv"; -import fse from "fs-extra"; dotenv.config(); -if (!process.env.STORAGE_PROVIDER) process.env.STORAGE_PROVIDER = "file"; -// TODO:nodejs path.join trailing slash windows compatible -if (process.env.STORAGE_PROVIDER === "file") { - if (process.env.STORAGE_LOCATION) { - if (!process.env.STORAGE_LOCATION.startsWith("/")) { - process.env.STORAGE_LOCATION = path.join(__dirname, "..", process.env.STORAGE_LOCATION, "/"); - } - } else { - process.env.STORAGE_LOCATION = path.join(__dirname, "..", "files", "/"); - } - fse.ensureDirSync(process.env.STORAGE_LOCATION); -} - import { CDNServer } from "./Server"; const server = new CDNServer({ port: Number(process.env.PORT) || 3003 }); server -- cgit 1.5.1