Compare commits
2 Commits
6483d6a8fc
...
4566f3678d
| Author | SHA1 | Date | |
|---|---|---|---|
| 4566f3678d | |||
| 0485559832 |
+1
-1
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8" />
|
||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>valentines</title>
|
||||
<title>Will you be my valentine?</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
import express from "express";
|
||||
import path from "path";
|
||||
|
||||
const app = express();
|
||||
const PORT = process.env.PORT || 3000;
|
||||
|
||||
// Serve static files from dist
|
||||
app.use(express.static(path.join(__dirname, "dist")));
|
||||
|
||||
// For React Router: always return index.html
|
||||
app.get("*", (req, res) => {
|
||||
res.sendFile(path.join(__dirname, "dist", "index.html"));
|
||||
});
|
||||
|
||||
app.listen(PORT, () => {
|
||||
console.log(`Server running at http://localhost:${PORT}`);
|
||||
});
|
||||
Reference in New Issue
Block a user