Web development basic and advance tutorial, php basic tutorial, laravel basic tutorial, React Native tutorial

Monday, February 22, 2021

React JS Start Up Project

0 comments

 In this tutorial i will explain how to create react js application using react.

Create New Project write this in command promot 

npx create-react-app my-app  

cd my-app

npm start


npm start

    Starts the development server.


  npm run build

    Bundles the app into static files for production.


  npm test

    Starts the test runner.


  npm run eject

    Removes this tool and copies build dependencies, configuration files

    and scripts into the app directory. If you do this, you can’t go back!


We suggest that you begin by typing:


  cd testapp

  npm start


Node js forever command

 Install forever
npm install forever -g

# Start it with file server.js
forever start server.js

# List processes currently managed
forever list

# Stop by filename
forever stop server.js

# Stop by id from `forever list`
forever stop 118

# Stop all processes
forever stopall

# List log files
forever logs

# Append logs into out/log/err files, watch directory for change and start server.js
APP_DIR=$(pwd)
rm $APP_DIR/*.log
forever --no-colors --append -o $APP_DIR/my_app_out.log -l $APP_DIR/my_app_log.log -e $APP_DIR/my_app_err.log \
--watch --watchDirectory $APP_DIR --watchIgnore *.log --watchIgnore node_modules \
start server.js
#> warn:    --minUptime not set. Defaulting to: 1000ms
#> warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
#> info:    Forever processing file: server.js


How to Deploy React App to Shared Hosting (CPanel) | React Website Hosting

No comments:

Post a Comment