-
환경설정Project using node.js/Cloning Catch-Mind 2020. 12. 12. 10:40
.gitignore
.gitignore을 생성하고 gitignore nodejs의 코드를 복사 붙여넣기
clownhacker.tistory.com/29?category=937585
gitignore
코드를 작성하고 github에 소스 코드를 올릴 때 원하지 않는 코드들이 있을 수가 있습니다. 그 중 대표적인 것이 node_modules 폴더입니다. npm 패키지를 설치할 때마다 node_modules에 파일들이 추가가 됩
clownhacker.tistory.com
npm 모듈 설치
npm 세팅 : clownhacker.tistory.com/27?category=937585
npm 설치 및 세팅
node.js 자체에도 내장된 모듈들이 있지만 이것만으로는 프로젝트를 진행하기가 어렵습니다. SW 세계에는 정말 좋은 사람들이 많기 때문에 오픈 소스로 많은 것들을 할 수가 있습니다. 그 중 node.js
clownhacker.tistory.com
- nodemon 설치 : npm install nodemon -D
- npm install express socket.io
- express 설치
- socket.io 설치
바벨 설정
clownhacker.tistory.com/30?category=937585
babel
소개 Ecma Script 앞으로 작성할 JS 코드는 ES(Ecma Script)6+다. ES는 JS의 문법을 설명하는 specification이다. ES를 살펴보면 JS 문법에 이것이 추가되었고 수정되었고 deprecated 되었다라는 것을 명시한다...
clownhacker.tistory.com
npm install @babel/{core,node,preset-env}
eslint 설정
#npm install eslint eslint-config-prettier eslint-plugin-prettier prettier -D
VSC의 Extension에서도 eslint를 설치해준다.
VSC eslint VSC의 settings.json에서 밑에 코드를 추가해준다.
setting.json .eslintrc.js파일을 만들고 다음과 같이 코드를 추가해준다.
module.exports = { env: { browser: true, es6: true, node: true, }, extends: ["eslint:recommended", "plugin:prettier/recommended"], parserOptions: { ecmaVersion: 2018, sourceType: "module", }, rules: { "no-console": "off", }, };
참고자료
- gitignore nodejs : https://github.com/github/gitignore/blob/master/Node.gitignore
- npm 공식 사이트 : https://www.npmjs.com
- npm 명령어 : https://docs.npmjs.com/cli-documentation/
- express 공식 사이트 : http://expressjs.com/en/starter/hello-world.html
- babel 사이트
- @babel/node
- @babel/preset-env
- @babel/core
소스 코드
github.com/zpskek/guessMind-v3/commit/6db9d0b3e6303f020f9e22c7bb6b4af132bbd206
'Project using node.js > Cloning Catch-Mind' 카테고리의 다른 글
Logout (0) 2020.12.14 login on Catch Mind (0) 2020.12.13 Sign up - Controller (0) 2020.12.13 Show sign up and login pages (0) 2020.12.13 Server setup (0) 2020.12.12