Skip to content

Commit

Permalink
merge konflikt lösen
Browse files Browse the repository at this point in the history
  • Loading branch information
jipsonminibhavan committed Feb 8, 2024
1 parent 02a328f commit 0771852
Showing 1 changed file with 8 additions and 27 deletions.
35 changes: 8 additions & 27 deletions backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,12 @@ import linkRoutes from "./routes/linkRoutes";

const app = new App([userRoutes, statusRoutes, linkRoutes]);

app.get("/corstest", (req: Request, res: Response) => {
res.json({
status: "ok",
});
});

app.use(
session({
secret: PASSPORT_SECRET,
resave: false,
saveUninitialized: false,
app
.initializeDB()
.then(() => {
app.listen();
})
);
const passportMiddleware = initializePassport();
app.use(passportMiddleware.initialize());

passport.use(new LocalStrategy(UserModel.authenticate()));
passport.serializeUser(UserModel.serializeUser());
passport.deserializeUser(UserModel.deserializeUser());

app.use("/", userRoutes);
app.use("/", statusRoutes);
app.use("/", linkRoutes);

//Express-Server
app.listen(PORT, () => {
console.log(`Server is running on port ${PORT}`);
});
.catch((error) => {
console.error("Failed to initialize the application:", error);
process.exit(1);
});

0 comments on commit 0771852

Please sign in to comment.