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.
14 lines
379 B
14 lines
379 B
import { Express } from "express"; |
|
import * as path from "path"; |
|
import * as serveStatic from "serve-static"; |
|
|
|
import * as paths from "@common/paths"; |
|
|
|
const index = path.join(paths.publicDir, "index.html"); |
|
|
|
export default function serveApp(app: Express) { |
|
app.use(serveStatic(paths.clientBuildDir)); |
|
app.get("/*", (req, res) => { |
|
res.sendFile(index); |
|
}); |
|
}
|
|
|