Skip to content

Commit da64c0d

Browse files
committed
server js update to fix route history for hosted spa
1 parent 335d800 commit da64c0d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

server.js

+6
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ app.use(
99
})
1010
);
1111
app.use(cors({ origin: true })); // enable origin cors
12+
1213
app.use(serveStatic(path.join(__dirname, "dist")));
14+
15+
app.get(/.*/, function (req, res) {
16+
res.sendFile(__dirname + "/dist/index.html");
17+
});
18+
1319
app.options("*", cors());
1420
app.use(
1521
cors({

0 commit comments

Comments
 (0)