Fixed production list sider shwoing on click by adding new component

This commit is contained in:
Patrick Fic
2020-07-24 13:54:13 -07:00
parent 66229b5d19
commit 1e00b376ea
9 changed files with 62 additions and 44 deletions

View File

@@ -94,12 +94,13 @@ app.post("/utils/time", utils.servertime);
//Serve React App if in Production
if (process.env.NODE_ENV === "production") {
app.use(express.static(path.join(__dirname, "client/build")));
app.use(express.static(path.join(__dirname, "admin/build")));
app.get("/service-worker.js", (req, res) => {
res.sendFile(path.resolve(__dirname, "..", "build", "service-worker.js"));
});
app.get("/admin/*", function (req, res) {
app.get("/admin*", function (req, res) {
res.sendFile(path.join(__dirname, "admin/build", "index.html"));
});