Why 5173? The New Standard.
If you recently switched from Create React App to Vite, you might be confused why localhost:3000 isn't working. Vite uses port 5173 by default to avoid conflicts.
1. Expose to Network (CLI)
By default, Vite only listens on local requests. To access it from your phone or another PC on the same wifi, add --host.
npm run dev -- --host
2. Change Vite Port back to 3000
Prefer the old way? Edit your vite.config.js file:
export default defineConfig({
server: {
port: 3000,
},
})