xxxxxxxxxx
# how to run react from an already init'ed react project
# (for example, that you cloned from git)
npm install # installs all node-modules
npm run build # builds react
npm run start # starts react development server
xxxxxxxxxx
npm install -g serve
serve -s build or serve -s build -l 4000
Run this command to get a full list of the options available
serve -h
xxxxxxxxxx
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"deploy": "serve -s build"
}
npm install -g serve
npm run-script deploy
xxxxxxxxxx
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"deploy": "serve -s build"
}
npm install -g serve
npm run-script deploy