Change backend API port from 3000 to 3005
- Update server default port to 3005 - Update frontend API base URL to point to port 3005
This commit is contained in:
@@ -9,7 +9,7 @@ import reportRoutes from './routes/reportRoutes';
|
|||||||
dotenv.config();
|
dotenv.config();
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const PORT = process.env.PORT || 3000;
|
const PORT = process.env.PORT || 3005;
|
||||||
|
|
||||||
// Middleware
|
// Middleware
|
||||||
app.use(helmet());
|
app.use(helmet());
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class ReportService {
|
|||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('photo', file);
|
formData.append('photo', file);
|
||||||
|
|
||||||
const response = await fetch(`${import.meta.env.VITE_API_BASE_URL || 'http://localhost:3000/api'}/reports/upload`, {
|
const response = await fetch(`${import.meta.env.VITE_API_BASE_URL || 'http://localhost:3005/api'}/reports/upload`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: formData,
|
body: formData,
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user