Browser
Chrome
Area
Auth (login / Google sign-in)
Steps to reproduce
Start the server on any frontend port other than 5173.
Expected behavior
The application should work on any frontend port.
What actually happened
While setting up the project, I was facing CORS error in dev login.

This happened because vite picked up some other port than 5173, which is hardcoded in the backend for course.
This can be solved by setting up a backend proxy in vite.config.js:
export default defineConfig({
plugins: [react()],},
server: {
port: 5173,
proxy: {
'/api': {
target: 'http://localhost:3000',
changeOrigin: true,
},
},
},
});
Logs / Screenshots

Browser
Chrome
Area
Auth (login / Google sign-in)
Steps to reproduce
Start the server on any frontend port other than 5173.
Expected behavior
The application should work on any frontend port.
What actually happened
While setting up the project, I was facing CORS error in dev login.

This happened because vite picked up some other port than 5173, which is hardcoded in the backend for course.
This can be solved by setting up a backend proxy in vite.config.js:
Logs / Screenshots