diff --git a/cryptide_project/src/server/server.js b/cryptide_project/src/server/server.js index b6408a5..2fd7d00 100644 --- a/cryptide_project/src/server/server.js +++ b/cryptide_project/src/server/server.js @@ -7,12 +7,12 @@ const authRoutes = require('./routes/authRoutes'); const DatabaseService = require('./services/DatabaseService'); const app = express(); -const port = 3000; +const port = 3003; // Middleware app.use(cors( { - origin: 'http://localhost:3001', + origin: 'http://localhost:3000', credentials: true } )); // Autoriser les requĂȘtes cross-origin diff --git a/cryptide_project/src/services/AuthService.tsx b/cryptide_project/src/services/AuthService.tsx index 716e57f..a6716bc 100644 --- a/cryptide_project/src/services/AuthService.tsx +++ b/cryptide_project/src/services/AuthService.tsx @@ -12,7 +12,7 @@ class AuthService{ static async signUp(data: any) { try { - const response = await fetch('http://localhost:3000/auth/signup', { + const response = await fetch('http://localhost:3003/auth/signup', { method: 'POST', headers: { 'Content-Type': 'application/json', @@ -36,7 +36,7 @@ class AuthService{ static async signIn(data: any) { try { - const response = await fetch('http://localhost:3000/auth/signin', { + const response = await fetch('http://localhost:3003/auth/signin', { method: 'POST', headers: { 'Content-Type': 'application/json', diff --git a/cryptide_project/src/services/SessionService.tsx b/cryptide_project/src/services/SessionService.tsx index 5c0d0a9..3fcb228 100644 --- a/cryptide_project/src/services/SessionService.tsx +++ b/cryptide_project/src/services/SessionService.tsx @@ -1,7 +1,7 @@ class SessionService { static async getSession() { try { - const response = await fetch('http://localhost:3000/session', { + const response = await fetch('http://localhost:3003/session', { method: 'GET', headers: { 'Content-Type': 'application/json',