Skip to content

Commit

Permalink
until i get any technique for handling auth from paasport google and …
Browse files Browse the repository at this point in the history
…passport-local we are going to use uuid()
  • Loading branch information
nikhil-dev-395 committed Jun 8, 2024
1 parent f11e0bc commit eb64478
Show file tree
Hide file tree
Showing 11 changed files with 770 additions and 81 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# rishta-matromony-site
tech stack - mern



16 changes: 9 additions & 7 deletions server/app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import express from "express";
import cors from "cors";
import session from "express-session";
import passport from "passport";
import errorHandler from "./src/middleware/errorHandling.middleware.js";
import { UserRouter } from "./src/routes/user.routes.js";
import { AuthRouter } from "./src/routes/auth.routes.js";
import { AuthRouter } from "./src/routes/auth.routes.js";
import "./src/utils/auth.utils.js"; // Initialize Passport.js

const app = express();

/* MIDDLEWARE */
app.use(cors())
app.use(express.json());
app.use(express.urlencoded({ extended: true }));

Expand All @@ -25,11 +26,12 @@ app.use(
app.use(passport.initialize());
app.use(passport.session());

/* ROUTES */
app.use("/api/v1/users", UserRouter);
app.use("/auth", AuthRouter);

/* ERROR HANDLER */
app.use(errorHandler);


/* ROUTES */
app.use("/auth", AuthRouter); //we added here google auth


export default app;
Loading

0 comments on commit eb64478

Please sign in to comment.