▼ Backend/노드JS (Node.js)
Node.js | 초간단 API 서버 만들기 - 1
Valar
2021. 7. 6. 15:32
반응형
1. express-generator 설치
Express Application Generator Tool
프로젝트를 사용자가 손쉽게 생성할 수 있게 도와주는 웹 애플리케이션 프레임워크이다.
npm install -g express-generator
2. 프로젝트 생성
express 프로젝트명
express demo
3. 모듈설치
# 프로젝트 경로로 이동
cd 프로젝트명
# npm 설치
npm install
cd demo
npm install
4. 서버구동
npm start
npm start
5. 테스트
기본 포트 3000으로 접근
http://localhost:3000
Node.js | 간단한 API 서버 만들기 - 2
https://kitty-geno.tistory.com/63
Node.js | 간단한 API 서버 만들기 - 2
파일구조 express를 통해 프로젝트를 생성하면 다음과 같은 구조를 가진다.
kitty-geno.tistory.com
반응형