DEVELOP
article thumbnail

 

 

Scale & Ship Faster with a Composable Web Architecture | Netlify

Realize the speed, agility and performance of a scalable, composable web architecture with Netlify. Explore the composable web platform now!

www.netlify.com

 

회원가입 및 로그인, 팀 생성 과정은 생략 

 

Add new site - Import an existing project

연동 원하는 깃 레포지토리 선택

빌드 설정해주기

  • 레포지토리 안에 프론트/백을 나누어 관리중이라면 프론트 폴더(client)를 Base directry에 입력한다. 
  • build command 는 CI=npm run build 를 사용하는데, 나중에 toml 파일을 활용하면 이 설정은 덮여씌워진다.
  • publish directory는 client/build

그러고나서 deploy 버튼을 누르면 배포가 성공 ! 

이 아니고, not found 에러가 난다.

 

netlify.toml 파일 작성하기

[build]
  publish = "build"
  command = "npm run build"
[[redirects]]
  from = "/*"
  to = "index.html"
  status = 200

 

package.json 에 homepage 주소 추가하기

  • netlify에 적용된 주소를 추가한다. 

 

그러면 이제 배포 성공 ! 

profile

DEVELOP

@JUNGY00N