Skip to content

Commit

Permalink
fix: issues
Browse files Browse the repository at this point in the history
  • Loading branch information
DevNono committed May 16, 2024
1 parent 5050d94 commit 08e11a5
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 2 deletions.
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"@sentry/node": "^8.0.0",
"@types/ejs": "^3.1.5",
"body-parser": "^1.20.2",
"compression": "^1.7.4",
"cookie-parser": "~1.4.6",
"debug": "~2.6.9",
"dotenv": "^16.4.5",
Expand Down
25 changes: 25 additions & 0 deletions web/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions web/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import webRouter from "./webRouter";
import apiRouter from "./apiRouter";
import { rateLimit } from 'express-rate-limit'
import ejs from "ejs";
// import compression from "compression";

dotenv.config();
const app = express();
Expand Down Expand Up @@ -37,8 +38,6 @@ app.use("", cookieParser());
app.use(json());
app.use(urlencoded({ extended: true }));

app.use(express.static('public'));

// Main routes
app.use(process.env.API_PREFIX, apiRouter);
app.use("", webRouter);
Expand Down
4 changes: 4 additions & 0 deletions web/src/webRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ webRouter.get("/", async (request: Request, response: Response) => {
return response.redirect("/borrow");
});

webRouter.get("/main.css", async (request: Request, response: Response) => {
response.sendFile(path.join(__dirname, "../public/main.css"));
});

webRouter.use(async (request: Request, response: Response) => {
return response.redirect("/");
});
Expand Down

0 comments on commit 08e11a5

Please sign in to comment.