React로 프로젝트 생성 해보기로 하였다.
cmd> node -v
cmd> npm -v
Add... > Add Local...
Program Files > nodejs > node.exe
직접 명령어로 입력해서 설치하는 것이지만 인텔리제이가 알아서 해준다.
Terminal 에서 아래와 타이핑하여 npm 시작을 해준다.
인텔리제이 Terminal 로 하면 해당 프로젝트 폴더로 설정 되어있기 때문에 'npm start'만 입력해 주면 끝
We suggest that you begin by typing:
cd C:\Users\zooc\Documents\Project\QuizGPT\quizgpt
npm start
npm start 입력시 에러가 발생했다.
위 에러는 terminal 이 기본적으로 powershell 로 열리도록 연결되어있기 때문에 난다고 한다.
1. 인텔리제이 내에서 cmd 를 열거나
2. terminal 디폴트 설정을 powershell 에서 cmd 로 변경해야한다.
그런 뒤 인텔리제이 재부팅 하면 끝.
위 방법이 난 귀찮아서.. 그냥 cmd 따로 열어서 명령어 직접 작성하여 구동하였다.
그렇게 하니까 짜잔-! 아래와 같이 서버 오픈 성공.
http://localhost:3000/
그런데 이렇게하면 프로젝트 폴더 밖에 imi파일이 생겨서 설정 파일이 없어 github로 파일 공유가 안된다는 이야기가 있어 테스트 중이다.
진짜 고생했던 부분 아래 사이트 보고 결국 해결함...
https://gdtbgl93.tistory.com/63
upstram 으로 remote 새로 만들고 pull 당길 때 --allow-unrelated-histories 명령어를 입력해서 git에서 서로 관련 기록이 없는 이질적인 두 프로젝트를 병합할 때 기본적으로 거부하는데, 이것을 허용해 주는 것
정리 중 (react, node.js 링크 섞임)
https://codingapple.com/unit/nodejs-react-integration/
https://programming119.tistory.com/118
https://dev.to/aneeqakhan/how-to-setup-a-nodejs-server-port-25l6
https://baby-coder.tistory.com/31 react
npm install react-router-dom
npm run build
npm install react-bootstrap bootstrap
npm install add axios
https://c17an.netlify.app/blog/node.js/npm-install-%EC%A0%95%EB%A6%AC/article/
npm install react-router-dom --save
읽어보면 좋을 사이트: https://codingapple.com/unit/react1-install-create-react-app-npx/
https://jaegeun.tistory.com/49
https://ko.reactjs.org/docs/hello-world.html
https://ojava.tistory.com/152
참고사이트: https://medium.com/hivelab-dev/react-js-tutorial-part2-c1be2c6dca79