public:computer:react.js

This is an old revision of the document!


React.js (리액트)

  • Install node.js (npm)
  • Install create-react-app
    $ npm install -g create-react-app
  • create app
    $ create-react-app <project name>
  • change directory into project
    $ cd <project name>
  • run project
    $ npm start
  • connect via web browser http://localhost:3000/
  • start with app.js file, and so on.
  • Install Node.js on Ubuntu
    # to install node.js we need CURL
    $ sudo apt install -y curl
    
    # install node.js using apt package manager
    $ sudo apt update & sudo apt upgrade -y
    $ sudo apt install nodejs
    $ nodejs -v
    $ sudo apt install npm
    $ npm -v
    
    # using PPA
    $ curl -sL https://deb.nodesource.com/setup_18.x -o nodesource_setup.sh  # version 18.x
    $ sudo bash nodesource_setup.sh 
    $ sudo apt-get install nodejs
    $ sudo apt-get install build-essential
    
  • nvm
    $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
    $ source ~/.bashrc
    $ nvm list-remote
    $ nvm install <version>
    $ nvm list
    $ nvm use <version>
    
  • npm update
    $ npm install -g npm@lsatest
    $ npm -v
    
  • public/computer/react.js.1672644969.txt.gz
  • Last modified: 2023/01/02 16:36
  • by alex