🔧 Fixed some static paths

This commit is contained in:
2021-10-27 22:04:01 -07:00
parent f5879e25fe
commit e70994c032
9 changed files with 51 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
import express, { Request, Response, Router, Express } from "express";
import bodyParser from "body-parser";
import router from "./route";
import path from "path";
// call express
const app: Express = express(); // define our app using express
@@ -14,7 +15,7 @@ const port: number = Number(process.env.PORT) || 8050; // set our port
app.get("/", (req: Request, res: Response) => {
console.log("sending index.html");
res.sendFile("/dist/index.html");
res.sendFile(path.resolve(__dirname, "../dist/index.html"));
});
// REGISTER ROUTES