This is an old revision of the document!
React.js (리액트)
Quick start
- 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.
Preparings
Install Node.js on Ubuntu
- 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@latest $ npm -v