React 프로젝트를 만드는 방법 중 하나인 npm을 사용하여 프로젝트 생성하기
Mac OS를 기준으로 작성
1. Node.js 설치
- nvm을 사용하여 Node.js 설치
nvm install --lts
2. React 프로젝트 생성
- npx 사용하여 프로젝트 생성
npx create-react-app 디렉토리명 --template typescript
npm start
- 개발모드로 프로젝트 실행
- 수정과 동시에 수정사항이 적용됨
npm run build
- 배포용으로 프로젝트를 빌드