본문 바로가기

카테고리 없음

Netlify 배포방법

728x90

1. 설치하기

npm install netlify-cli -g
netlify deploy

2. 회원가입 후 승인

 

3. Create & configure a new site

 

4. Team & Site name 설정

 

5. publish directory = build로 

 

클라이언트 측 라우팅 지원

public/_redirects 파일을 생성하고

/*  /index.html  200

 

6. draft url 로 최종 결과물을 확인하고, 프로덕션 모드로 배포

netlify deploy --prod

 

https://create-react-app.dev/docs/deployment#netlify

 

Deployment | Create React App

npm run build creates a build directory with a production build of your app. Set up your favorite HTTP server so that a visitor to your site is served index.html, and requests to static paths like /static/js/main..js are served with the contents of the /st

create-react-app.dev

 

728x90