출처 : 인프런_따라하며 배우는 노드, 리액트 시리즈 — 기본 강의
Step 1) Model Schema 작성
Model : Schema를 감싸주는 역할이며 Shema는 정보를 지정해주는 역할을 한다.
Step 2) Git 설치와 commit
Git : 분산 버젼 관리 시스템
git을 다운로드하고 아래의 명령어로 잘 설치됐는지 확인한다.
$git --version
아래의 명령어로 git 저장소를 만들어준다.
$git init
라이브러리들을 제외하고 저장소에 올리기 위해 .gitignore 파일을 생성한다.
.gitignore파일에 node_module(라이브러리 폴더)를 입력해서 이 폴더를 제외하고 git commit 을 실행한다. (Local 저장소에 올라감)
Step 3) SSH 설정하기
내 노트북과 GITHUB 사이에서 안전하게 통신하기 위해 Secure Shel(SSH)를 설정해보자.
- 참고사이트
Generating a new SSH key and adding it to the ssh-agent - GitHub Docs
Generating a new SSH key and adding it to the ssh-agent After you've checked for existing SSH keys, you can generate a new SSH key to use for authentication, then add it to the ssh-agent. Mac Windows Linux If you don't already have an SSH key, you must gen
docs.github.com
$ ls -a ~/.ssh
위 명령어를 실행했을때 아무것도 안나오면 SSH 설정이 안 된것이다.
.
$ ssh-keygen -t ed25519 -C "nanyoung@gmail.com"
$ eval "$(ssh-agent -s)"
$ ssh-add -K ~/.ssh/id_ed25519
$ pbcopy < ~/.ssh/id_ed25519.pub
터미널에서 차례로 위 명령어를 실행한다.
그 후 VSCode로 돌아와서 아래의 명령어를 실행하여 이전에 만들어놓은 Remote Repository에 push한다.
$ git remote add origin https://github.com/NanyoungKim/boiler-plate-ko.git
$ git branch -M main
$ git push -u origin main
'Node & React > Basic Study' 카테고리의 다른 글
[MAC] Node/React 기초 — Authentication 기능 구현하기 (0) | 2021.01.14 |
---|---|
[MAC] Node/React 기초 - 로그인 기능 (0) | 2021.01.14 |
[MAC] Node/React 기초 — MongoDB에 데이터 암호화하여 올리기 (0) | 2021.01.14 |
[MAC] Node/React 기초 — Body Parser, POSTMAN,Register Router, NODEMON 설정하기 (0) | 2021.01.14 |
[MAC] Node/React 기초 — MongoDB 설치 및 기본 셋팅 (0) | 2021.01.14 |