Skip to content

Commit

Permalink
resolver info
Browse files Browse the repository at this point in the history
  • Loading branch information
jipsonminibhavan committed Feb 8, 2024
2 parents dbff6bf + e31eaac commit 02a328f
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/full-stack-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
cd frontend
npm install
- name: Build Frontend (if necessary)
- name: Build Frontend
run: |
cd frontend
npm run build
Expand Down
35 changes: 27 additions & 8 deletions backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,31 @@ import linkRoutes from "./routes/linkRoutes";

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

app
.initializeDB()
.then(() => {
app.listen();
})
.catch((error) => {
console.error("Failed to initialize the application:", error);
process.exit(1);
app.get("/corstest", (req: Request, res: Response) => {
res.json({
status: "ok",
});
});

app.use(
session({
secret: PASSPORT_SECRET,
resave: false,
saveUninitialized: false,
})
);
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}`);
});

0 comments on commit 02a328f

Please sign in to comment.