개발story

TIL # 71 < Glitch로 json-server배포 > 본문

Learn/Today I Learn

TIL # 71 < Glitch로 json-server배포 >

미래개발자 2023. 2. 23. 17:45
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
Comments