Skip to content

Commit

Permalink
Update server.js
Browse files Browse the repository at this point in the history
  • Loading branch information
saimadib authored Sep 6, 2023
1 parent 25434a5 commit e196848
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Backend/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,17 @@ app.use("/api/creator", creatorRouter);
app.use("/api/editor", editorRouter);


app.use(express.static("public"));



app.get("*", (req, res) => {
res.sendFile(path.join(__dirname + "/public/index.html"));
});


app.listen(port, () => {
console.log(`Server is running on port ${port}`);
});

module.exports = app;
module.exports = app;

0 comments on commit e196848

Please sign in to comment.