From 8b8d12fb6e2ebe0e89d6afda223a02407215128a Mon Sep 17 00:00:00 2001 From: Brendan Xiong <32696639+brendanxiong@users.noreply.github.com> Date: Tue, 6 Aug 2024 12:07:12 -0700 Subject: [PATCH] add static typing to server file --- flake-guard-app/src/server/server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flake-guard-app/src/server/server.ts b/flake-guard-app/src/server/server.ts index 8483ebd..a27b40b 100644 --- a/flake-guard-app/src/server/server.ts +++ b/flake-guard-app/src/server/server.ts @@ -7,6 +7,7 @@ import resultsRouter from './routes/resultsRouter'; import userDashRouter from './routes/userDashRouter'; import tempDashRouter from './routes/tempDashRouter'; import {errorHandler} from './errors/errorHandler'; +import {Request, Response} from 'express'; const app = express(); const PORT = process.env.PORT || 3000; @@ -22,7 +23,7 @@ app.use('/tempDash', tempDashRouter); app.use('/userDash', userDashRouter); // Catch all -app.use('*', (req, res) => { +app.use('*', (req: Request, res: Response) => { res.sendFile(path.resolve(__dirname, '../../dist/index.html')); });