I know two way to deploy server is npm start
and serve s build
So what different between npm start
and serve s build
to start server in react js?
These are all custom script, you can find the definition in package.json
file. Normally start
is for starting the development build, build
is for making the production build.
Ex.
"scripts": {
"start": "react-scripts start",
"lint": "eslint ./src",
"lint:fix": "eslint ./src --fix",
"test": "react-scripts test",
"test:coverage": "react-scripts test --coverage --watchAll=false",
"build": "rollup -c",