minte9
LearnRemember / JAVASCRIPT



Node

Install latest versions of node.js and npm, if not already installed.
 
node -v
npm -v
Install create react component.
 
npm install -g create-react-app
Create your first React app Every app has at least one component App.js The app main folder is on /src
 
cd /
create-react-app myapp
Start the node server
 
cd /myapp
npm start

// Navigate to http:// localhost:300 to see your app
You can also, build app, which creates a production-ready bundle (minified)
 
npm run build
mkdir /myapp-build
cp /myapp/build/ /myapp-build






Questions and answers




Install react

  • a) node install react
  • b) npm install -g create-react-app

Start react server

  • a) node start
  • b) react start


References