You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

11 lines
316 B

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