use create-react-app to start building a new single-page application
npx create-react-app react-demo
cd react-demo
npm start
if something is already running on port 3000, follow below step, modify start code in package.json
// windows
set PORT=5000 && react-scripts start
//mac
PORT=5000 react-scripts start
have a reference: https://github.com/vincentzyc/notes/issues/2
网友评论