If you want to run your localhost on a different port you need to change your vite config file (vite.config.ts)
export default defineConfig({ server: { port: 8080 }, ...rest of config });