1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-10 12:42:44 +01:00

moved import

This commit is contained in:
xnacly 2021-08-18 18:02:39 +02:00
parent d2840cb553
commit b1c459bb1b

View File

@ -2,6 +2,7 @@ import path from "path";
import dotenv from "dotenv";
import fse from "fs-extra";
dotenv.config();
import { CDNServer } from "./Server";
if (!process.env.STORAGE_PROVIDER) process.env.STORAGE_PROVIDER = "file";
// TODO:nodejs path.join trailing slash windows compatible
@ -16,8 +17,6 @@ if (process.env.STORAGE_PROVIDER === "file") {
fse.ensureDirSync(process.env.STORAGE_LOCATION);
}
import { CDNServer } from "./Server";
const server = new CDNServer({ port: Number(process.env.PORT) || 3003 });
server
.start()