본문으로 바로가기

React 프로젝트 생성

category JavaScript/React 2019. 10. 5. 23:58
반응형

https://ko.wikipedia.org

<"리액트를 다루는 기술" 책 참조>


안녕하세요. 이번에 React 프로젝트를 생성해보겠습니다.

 

CMD창에서 create react-app 프로젝트명 명령어를 사용하면 밑과 같이 나옵니다.

 

Installing packages. This might take a couple of minutes.
Installing react, react-dom, and react-scripts...


> core-js@2.6.9 postinstall C:\Users\GwangMin\hello-react\node_modules\babel-runtime\node_modules\core-js
> node scripts/postinstall || echo "ignore"


> core-js@3.2.1 postinstall C:\Users\GwangMin\hello-react\node_modules\core-js
> node scripts/postinstall || echo "ignore"

+ react-scripts@3.1.2
+ react-dom@16.10.1
+ react@16.10.1
added 1441 packages from 686 contributors and audited 904866 packages in 262.455s
found 0 vulnerabilities


Success! Created hello-react at C:\Users\GwangMin\hello-react
Inside that directory, you can run several commands:

  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 hello-react
  npm start

Happy hacking!

프로젝트 폴더가 만들어지면 저는 hello-react명이기 때문에

 

cd hello-react
npm start

폴더로 이동한다음 서버를 구동하면

 

http://localhost:3000/

 

리액트 초기 프로젝트 페이지를 확인 할 수 있습니다.

 

※궁금하신 점은 댓글로 남겨주세요

※공감이 되셨다면 공감 버튼도 눌러주세요

반응형

'JavaScript > React' 카테고리의 다른 글

React Babel의 transform-class-properties 문법  (0) 2020.07.29
React 컴포넌트  (0) 2019.12.02
Additional logging details can be found in : /npm-debug.log  (0) 2019.11.28
JSX 란  (0) 2019.10.05
JavaScript 라이브러리 React란 및 설치  (0) 2019.10.04