generated from lucien/api-template
fix: fixed front display
This commit is contained in:
parent
f0881f2025
commit
f841ed348e
1 changed files with 5 additions and 0 deletions
|
@ -29,6 +29,11 @@ function loadRoutes(folderName) {
|
|||
|
||||
loadRoutes("api");
|
||||
|
||||
app.use(express.static("public"));
|
||||
app.get("*", (req, res) => {
|
||||
res.sendFile(path.join(__dirname, "public", "index.html"));
|
||||
});
|
||||
|
||||
app.listen(port, () => {
|
||||
console.log(`Server listening on port ${port}`);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue