From acbff3464045c61804fa31ffa77f59855c7e5a2d Mon Sep 17 00:00:00 2001 From: Tobias Hopp Date: Wed, 16 Apr 2025 09:22:47 +0200 Subject: [PATCH] Fix tailwind --- frontend/index.html | 3 ++- frontend/src/app.css | 4 +--- package.json | 2 ++ src/app.ts | 6 ++---- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 67ad3f2..0ebf60a 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -1,10 +1,11 @@ + Relnet - +
diff --git a/frontend/src/app.css b/frontend/src/app.css index bd6213e..a461c50 100644 --- a/frontend/src/app.css +++ b/frontend/src/app.css @@ -1,3 +1 @@ -@tailwind base; -@tailwind components; -@tailwind utilities; \ No newline at end of file +@import "tailwindcss"; \ No newline at end of file diff --git a/package.json b/package.json index d22ea4e..d7ce721 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,7 @@ "dotenv": "^16.5.0", "express": "^5.1.0", "express-validator": "^7.2.1", + "helmet": "^8.1.0", "jsonwebtoken": "^9.0.2", "mongoose": "^8.13.2" }, @@ -38,6 +39,7 @@ "@types/cors": "^2.8.17", "@types/dotenv": "^8.2.3", "@types/express": "^5.0.1", + "@types/helmet": "^4.0.0", "@types/jsonwebtoken": "^9.0.9", "@types/mongoose": "^5.11.97", "@types/node": "^22.14.1", diff --git a/src/app.ts b/src/app.ts index fc55309..d735ae3 100644 --- a/src/app.ts +++ b/src/app.ts @@ -7,12 +7,14 @@ import networkRoutes from './routes/network.routes'; import peopleRoutes from './routes/people.routes'; import relationshipRoutes from './routes/relationship.routes'; import path from 'node:path'; +import helmet from "helmet"; dotenv.config(); const app: Application = express(); // Middleware +app.use(helmet()); app.use(express.json()); app.use(cookieParser()); app.use( @@ -28,10 +30,6 @@ app.use('/api/networks', networkRoutes); app.use('/api/networks', peopleRoutes); app.use('/api/networks', relationshipRoutes); -// Base route -/*app.get('/', (req, res) => { - res.send('Friendship Network API is running'); -});*/ app.use(express.static(path.join(__dirname, '../frontend/dist/')));