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"));