diff --git a/src/entries/Cron.ts b/src/entries/Cron.ts index 62a2bb93..c6331797 100644 --- a/src/entries/Cron.ts +++ b/src/entries/Cron.ts @@ -1,17 +1,9 @@ import "module-alias/register"; import "reflect-metadata"; import { Container } from "typedi"; -import ExpressServer from "@Common/system/ExpressServer"; -import routes from "@App/index"; -import cors from "cors"; -import bodyParser from "body-parser"; -import errorHandler from "@App/middlewares/ErrorHandler"; import { BackendVariables } from "@Common/config/variables/Variables"; -import multer from "multer"; import CronService from "@Services/common/CronService/CronService"; -const storage = multer.memoryStorage(); - (async () => { try { const variables = await Container.get(BackendVariables).validate(); @@ -19,24 +11,6 @@ const storage = multer.memoryStorage(); if(variables.ENV === "stg"){ Container.get(CronService).sendMails(); } - const port = variables.APP_PORT; - const rootUrl = variables.APP_ROOT_URL; - const label = variables.APP_LABEL ?? "Unknown Service"; - - Container.get(ExpressServer).init({ - label, - port: parseInt(port), - rootUrl, - middlwares: [ - cors({ origin: "*" }), - multer({ storage: storage }).single("file"), - bodyParser.urlencoded({ extended: true }), - bodyParser.json(), - ], - errorHandler, - }); - - routes.start(); } catch (e) { console.error(e); }