Skip to content

Commit 52da53f

Browse files
committed
feat: add swagger and fix the bugs after testing
1 parent f601d7c commit 52da53f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

app.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ app.use(cookieParser());
2525
app.use(
2626
cors({
2727
origin: ["*"],
28-
methods: ["GET", "POST", "PUT", "PATCH", "DELETE"],
28+
methods: ["GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"],
2929
credentials: true,
3030
})
3131
);

config/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export const frontendUrl =
1414
export const mongoUri =
1515
process.env.NODE_ENV === "development"
1616
? process.env.LOCAL_MONGO_URI
17-
: process.env.MONGO_URL;
17+
: process.env.MONGO_URI;

config/database.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ export const connectDB = () => {
77
.then((c) => {
88
console.log(`Database connected with ${c.connection.host}`);
99
})
10-
.catch((err) => console.log("Error connecting"));
10+
.catch((err) => console.log(err));
1111
};

0 commit comments

Comments
 (0)