Skip to content

Commit 83612bc

Browse files
chore: refactor event form submission for prod deployment
1 parent 8d9f0fd commit 83612bc

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const express = require("express");
22
const bodyParser = require("body-parser");
33
const cors = require("cors");
4-
// const dbConnect = require("./database/helpers/dbconnect");
4+
const dbConnect = require("./database/helpers/dbconnect");
55
const routes = require("./routes/index.js");
66
require("dotenv").config();
77

@@ -22,11 +22,11 @@ routes.setupRoutes(app);
2222

2323
(async () => {
2424
try {
25-
// await dbConnect().then(() => {
26-
app.listen(process.env.PORT, () => {
27-
console.log(`server listening on port ${process.env.PORT}`);
25+
await dbConnect().then(() => {
26+
app.listen(process.env.PORT, () => {
27+
console.log(`server listening on port ${process.env.PORT}`);
28+
});
2829
});
29-
// });
3030
} catch (error) {
3131
console.log(error);
3232
}

routes/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const {
1111
gitlabAuth,
1212
gitlabAuthCallback,
1313
} = require("../providers/index.js");
14-
const { handleOAuthCallback } = require("../providers/github/auth.js");
1514

1615
/**
1716
* Redirects the user to the GitHub OAuth login page for authentication.
@@ -161,7 +160,6 @@ const setupRoutes = (app) => {
161160
app.get("/api/login", login);
162161

163162
//callbacks
164-
app.get("/api/callback/github", handleOAuthCallback);
165163
githubAuthCallback(app);
166164
gitlabAuthCallback(app);
167165
app.get("/api/badgedRepos", badgedRepos);

0 commit comments

Comments
 (0)