Notice
Recent Posts
Recent Comments
Link
개발story
TIL # 71 < Glitch로 json-server배포 > 본문
728x90
versel은 리액트파일을 배포하기에 용이하지만 json-server를 배포할때 read-only라서 db.json을 수정하지 못해 500 error가 발생한다. 따라서 versel로 리액트파일을 배포하고 glitch로 json-server를 배포하는게 쉽다.
가짜 REST API인 json-server를 glitch로 배포하는 방법
1. https://glitch.com/ 에 접속해서 로그인 한 후 새 프로젝트 시작을 클릭한다.
2. GitHub에서 가져오기를 클릭한다.
3. https://github.com/jesperorb/json-server-heroku.gitURL 입력에 붙여넣고 확인을 클릭
4. URL을 라이브 사이트로 가져오려면 공유 버튼을 클릭한다.
참고자료
https://github.com/jesperorb/json-server-heroku#deploy-to-glitch
https://dev.to/newtonombese/hosting-your-json-server-on-glitch-1nnm
728x90
'Learn > Today I Learn' 카테고리의 다른 글
기술면접대비 Day-2 (0) | 2023.03.28 |
---|---|
기술면접대비 Day-1 (0) | 2023.03.27 |
TIL # 69 < Next.js <Image> 컴포넌트 > (0) | 2023.02.20 |
TIL # 68 < javascript 얕은복사 / 깊은복사 > (0) | 2023.02.15 |
TIL # 67 < next.js에서 react query 적용 /json-server 설치&실행 > (0) | 2023.02.12 |
Comments