From 9b966f9d80c73cf380c09a1356848136f0d4cc44 Mon Sep 17 00:00:00 2001 From: Lizzie Date: Fri, 29 Nov 2024 23:04:32 -0500 Subject: [PATCH] tried --- server/app.ts | 2 ++ server/package.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/server/app.ts b/server/app.ts index 5d7ff70..2fef8c6 100644 --- a/server/app.ts +++ b/server/app.ts @@ -16,6 +16,7 @@ import commentController from './controller/comment'; import communityController from './controller/community'; import { FakeSOSocket } from './types'; import userController from './controller/user'; +import cookieParser from 'cookie-parser'; dotenv.config(); @@ -64,6 +65,7 @@ app.use( ); app.use(express.json()); +app.use(cookieParser()); app.get('/', (req: Request, res: Response) => { res.send('hello world'); diff --git a/server/package.json b/server/package.json index 00d4437..54202c6 100644 --- a/server/package.json +++ b/server/package.json @@ -1,5 +1,6 @@ { "dependencies": { + "cookie-parser": "^1.4.7", "cors": "^2.8.5", "express": "^4.19.2", "mongodb": "^6.8.0", @@ -11,6 +12,7 @@ "@eslint/js": "^8.57.0", "@stryker-mutator/core": "^8.6.0", "@stryker-mutator/jest-runner": "^8.6.0", + "@types/cookie-parser": "^1.4.8", "@types/cors": "^2.8.17", "@types/dotenv": "^6.1.1", "@types/express": "^4.17.21",