설치
1. 당연히 git부터 삽입!
깃헙 repo 하나 만들기. Readme는 포함되는게 좋음
git init (repo 주소 입력, gitignore에 )
git remote add "깃허브 레포 주소"
.gitignore 파일에 넣어줘야하는 리스트 ( 참조 1)
파일 형식은 (참조 2)
- .env*
- dist
- package-lock.json
- node_modules/
- .idea
- *.log
- .graphcoolrc
- **/.DS_Store
git branch -M master (main으로 해도 됨. master branch의 이름을 뭘로 할거냐 결정)
git add .
git commit -m "남길 메시지. first commit"
git push origin master
git pull origin master
2. graphql-yoga 설치
graphql-yoga는 react의 create-react-app과 같이 graphQL을 이용하기 쉽도록 해주는 라이브러리이다.
아래 명령어를 통해 설치한다.
npm install graphql-yoga
서버 수정사항을 저장하면 바로 서버가 재시작 되도록, nodemon도 이용한다
npm install nodemon -g
>> package.json의 script - start 에 추가한다.
>> nodemon은 .js 파일을 저장할때만 새로고침된다! .graphql 파일을 수정하여 저장해도 nodemon에 의해 서버가 재실행되지는 않는다.
3. VScode extention : graphQL
vscode IDE에서의 graphQL 적용을 위해 extension을 설치한다!
참조
1. velog - graphql-yoga 시작하기
velog.io/@alwaysfun2183/graphql-yoga-%EC%8B%9C%EC%9E%91%ED%95%98%EA%B8%B0
2. Git .gitignore 적용하기
nesoy.github.io/articles/2017-01/Git-Ignore
'Programming-[Backend] > graphQL' 카테고리의 다른 글
6. 영화 API GraphQL : Query, Mutation 요청해보기 (0) | 2021.01.05 |
---|---|
5. 영화 API GraphQL : 구조, 원리 파악하기 (0) | 2021.01.05 |
4. graphQL 서버 기본 작성법 : schema, resolver (0) | 2020.12.28 |
3. 초기 세팅 1 : ES6 코드 적용을 위한 babel-node 설치 (0) | 2020.12.28 |
1. graphQL 의 목적 (0) | 2020.12.26 |