Secondary Port

Why Localhost 3001?

If port 3000 is busy, React automatically switches to 3001. Or, this might be your backend API server.

Go to http://localhost:3001 →
Kill Port 3001
npx kill-port 3001

Full Stack Development Ports

In many MERN stack (Mongo, Express, React, Node) setups, developers run the frontend on 3000 and the backend API on 3001.

CORS Issue

1. Fixing CORS Errors

If your frontend (3000) tries to talk to backend (3001), browser blocks it. Install cors in your Node app:

npm install cors
// In app.js
app.use(cors());

Developer Port Reference Guide

Frontend & Web
3000 React / Node / Default 3001 React Secondary
Backend & Infrastructure
5000 Flask / AirPlay 4000 Jekyll / Hexo
Database & Cache
3306 MySQL 5432 PostgreSQL
DevOps & Data Science
8888 Jupyter Notebook 9200 Elasticsearch 9090 Prometheus 15672 RabbitMQ UI 8500 Consul 127.0.0.1 Loopback IP