Browse Source

Added wildcard route for react router

update-deps
Alex Mikhalev 7 years ago
parent
commit
321738a517
  1. 3
      server/app/serveApp.ts

3
server/app/serveApp.ts

@ -5,4 +5,7 @@ import * as paths from "paths";
export default function serveApp(app: Express) { export default function serveApp(app: Express) {
app.use(serveStatic(paths.appBuildDir)); app.use(serveStatic(paths.appBuildDir));
app.get("/*", (req, res) => {
res.sendFile(path.join(paths.publicDir, "index.html"));
});
} }

Loading…
Cancel
Save