From beb0d6738420117ddea728eb056861752aa270f8 Mon Sep 17 00:00:00 2001 From: Nial <48334675+nmcc1212@users.noreply.github.com> Date: Fri, 16 Feb 2024 15:43:50 +0000 Subject: [PATCH] reformat index.ts --- newAPI/src/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/newAPI/src/index.ts b/newAPI/src/index.ts index 17d8166..af437ec 100644 --- a/newAPI/src/index.ts +++ b/newAPI/src/index.ts @@ -7,16 +7,14 @@ import postRouter from "./routes/postRoutes"; import userRouter from "./routes/userRoutes"; import loggerMiddleware from "./middlewares/logger"; - - const app = express(); const port = 3101; app.use(express.json()); app.use(loggerMiddleware); -app.use("/posts",postRouter); -app.use("/users",userRouter); +app.use("/posts", postRouter); +app.use("/users", userRouter); async function main() { await mongoose.connect("mongodb://100.125.70.69:27017/socialAPI", {