From ae64510d9d594ad1d7a1477b9bee011ade38ae11 Mon Sep 17 00:00:00 2001 From: Aydan Pirani Date: Sun, 14 Apr 2024 18:16:34 -0500 Subject: [PATCH] Update app.ts --- src/app.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/app.ts b/src/app.ts index 397879a..7f9f4b5 100644 --- a/src/app.ts +++ b/src/app.ts @@ -3,6 +3,7 @@ import { StatusCodes } from "http-status-codes"; import { Config } from "./config"; import { connectToDatabase } from "./utilities"; +import cors from "cors"; import morgan from "morgan"; import bodyParser from "body-parser"; import errorHandler from "./middleware/error-handler"; @@ -17,6 +18,8 @@ const app = express(); // (we can remove this later) app.disable("etag"); +app.use(cors()); + // To display the logs every time app.use("/", morgan("dev"));