🍃 Leaf

Create React App

Initialization

# No installation required
npx create-react-app <project-name>

Installation

npm init react-app <project-name>

More at Creating an App (create-react-app.dev).

Usage

react-scripts <command>
react-scripts start
react-scripts test
react-scripts build
# Use with npm scripts
npm start
npm test
npm run build
// package.json e.g.:
{
  "scripts": {
    "start": "set PORT=<port-number> && react-scripts start",
    "test": "react-scripts test",
    "build": "react-scripts build"
  }
}

More at Available Script.