배포하기
Netlify 배포
GROWNFRESH
2020. 8. 26. 13:06
앱 주소 : app.netlify.com/sites/jolly-turing-1308c8/deploys/5f45df38d47f526391a40912
https://jolly-turing-1308c8.netlify.app/
참고 사이트
1) netlify 홈페이지에서 deploy 하는 방법
2) 터미널에서 "netlify login" "netlify deploy" 하는 방법
1) 방법으로 한 후에 react-router가 제대로 작동했다.
(주소 뒤에 "/login" 등을 붙였을 때 이동 가능)
이동이 안되는 문제에 대해서는 _redirect 관련
https://sung.codes/blog/2018/12/18/page-not-found-on-netlify-with-react-router/
Build Setting
base directory : "build" 명령어가 있는 client 폴더로 지정
build command : "npm run build" (오류가 떠서 scripts의 build를 "react-scripts build"에서 "CI= react-scripts build"로 변경)
Publish diretory : client/build
=> git push 할 때마다 자동으로 npm run build 하는 원리