Prepared for serving
This commit is contained in:
parent
fd71714fc0
commit
6526b51429
6 changed files with 39 additions and 17 deletions
8
lib/routes/react-route.js
vendored
8
lib/routes/react-route.js
vendored
|
@ -1,6 +1,8 @@
|
|||
import express, { Router } from "express";
|
||||
|
||||
import path from "path";
|
||||
const router = Router();
|
||||
|
||||
router.use("/qualiteer", express.static("build/"));
|
||||
router.use("/", express.static(path.resolve("./build")));
|
||||
router.get("/*", (req, res) =>
|
||||
res.sendFile(path.resolve("./build/index.html"))
|
||||
);
|
||||
export default router;
|
||||
|
|
|
@ -19,7 +19,7 @@ export default function buildRoutes(pg, skio) {
|
|||
// Middlewares
|
||||
|
||||
// Routes
|
||||
router.use(react); // Static Build Route
|
||||
router.use("/qualiteer", react); // Static Build Route
|
||||
router.use("/api/results", results);
|
||||
router.use("/api/alerting", alerting);
|
||||
router.use("/api/catalog", catalog);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue