개발하는 루루언니

React 내가 만든 프로젝트 git-hup 배포하기 본문

컴퓨터 정보/리액트

React 내가 만든 프로젝트 git-hup 배포하기

혜닝혜루 2022. 10. 19. 16:12
728x90
반응형

My JSON Server - Fake online REST server for teams (typicode.com)

 

My JSON Server - Fake online REST server for teams

my-json-server.typicode.com/user/repo/posts/1 { "id": 1, "title": "hello" }

my-json-server.typicode.com

1. my json Server 홈페이지 들어가기 : git- hub을 만들어서 url에  3번 주소처럼 복사하란 뜻

 

2. git-hup 에서 새로운 프로젝트 만들기 : tkrkr55 은 내아이디 , hyein-hnm 내 프로젝트명

 

 

3.  https://my-json-server.typicode.com/<your-username>/<your-repo>

 

My JSON Server - Fake online REST server for teams

Available resources You can use GET, POST, PUT, PATCH and DELETE. Changes aren't persisted between calls. Source https://github.com/typicode/demo/blob/[main|master]/db.json

my-json-server.typicode.com

해당 주소로 내  url 에 붙혀넣기하기 ( 아래 코딩 사진 참고)

 

여기서 <your-username> 은 내 깃허브 아이디

<your-repo> 는 내가 프로젝트 만들때 프로젝트명

 


 

url 해석 : my-json 서버가 알아서 내 git-hup으로와서 내장되어 있는 db.json파일을 반환을 해준다.

 

 

5. 이제 git -hup 에 올려보자 

 

💙터미널 ( 순서대로 입력하기)💙

git init
git add . 
git commit -m "firstcommit"

얘는 git-hup 프로젝트 만들때 나오는아이 (파란줄로 적혀있음)
git remote add origin https://github.com/tkrkr55/hyein-hnm.git
git push origin master

순서대로 끝 맞췄다?

 

이렇게 했을때 db.json 파일이 나와야 하는데 안나온 경우 다시 설치하기

또는?

 

json 서버를 터미널에 설치해보자!

npm install -g json-server
728x90