개발 환경 설치
1. nodejs 설치
https://nodejs.org/ko/download/
node -v // nodejs 설치 확인
npm -v // npm 설치 확인 (nodejs 설치하면 같이 옴)
2. npx 설치
npm install npx -g // npx 설치
npm install -g npm // 업데이트
npx -v // 설치 확인
3. git 설치
git -v // git 설치 확인
git --version // 버전 확인
시작하기
1. create-react-app
터미널에서 폴더 만들 곳으로 들어가기
cd Documents // 해당 위치에 폴더를 만들 예정
react 프로젝트 만들기 (폴더 이름과 동일)
npx create-reat-app movie_app // movie_app 이란 이름으로 만들 예정
// movie_app 부분에 하고자 하는 네임명 지정
react 실행 (띄우기)
cd movie_app // 해당 폴더로 이동
yarn start // react 실행
*참고
yarn start // starts the development server.
yarn build // bundles the app into static files for production.
2. git 에 올리기
vs code 에서 git init 으로 확인
github repository 만들기 (repository 주소 복사 http://....)
git remote add origin http://... // 해당 https 주소 붙이기
git add . // . 을 쓰면 모든 소스를 git 하겠다
git commit -m "first commit" // "" 사이에 comment 달기
git push origin master // master로 push하기
'React' 카테고리의 다른 글
[React] 노마드 수업 1-state, setState 등 소스 (0) | 2022.07.23 |
---|---|
[React] 노마드 수업 1- 소스 (0) | 2021.08.20 |
[React] 노마드 수업 1 (0) | 2021.08.20 |
[React] 설치 및 시작하기 - 노마드 수업 정리 (0) | 2021.08.20 |
#React (0) | 2021.08.20 |