Monti

#1 Node.js RestAPI 만들기 - 프로젝트 생성 본문

JavaScript/Node.js

#1 Node.js RestAPI 만들기 - 프로젝트 생성

montt 2021. 11. 8. 21:20
VSCode와 Node.js 설치는 Vue.js 개발환경 구축에서 다루었으니 아래 글을 참고해주시면 됩니다.
 

#2 Vue 프로젝트 생성을 위한 개발환경 구축-1(VSCode, Node.js)

vscode 설치 https://code.visualstudio.com/ Visual Studio Code - Code Editing. Redefined Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud ap..

dolmengs.tistory.com

 

 1. express-generator

  • express-generator란? - 서버의 기본적인 구조와 파일을 자동으로 생성하도록 도와주는 모듈

1) Node.js 설치 후 터미널창(cmd)에서 다음과 같은 명령어를 입력한다.

1
2
// express-generator 전역 설치
npm i -g express-generator
cs

2) express-generator의 설치가 완료되었으면 다음과 같은 명령어로 프로젝트를 생성한다.

1
2
// crud-back(project_name) 프로젝트 생성
express crud-back
cs

3) 생성된 프로젝트로 이동한 후 의존성을 주입해준다.

1
2
3
4
// 생성 프로젝트로 이동
cd crud-back
// 의존성 주입
npm install
cs

4) 생성된 프로젝트

'JavaScript > Node.js' 카테고리의 다른 글

node Server Custom Cookies Setting  (0) 2022.10.03
#2 Node.js RestAPI 만들기 - DB 연동(MariaDB)  (0) 2021.11.08
Comments