본문으로 건너뛰기

Node - express-generator 구조

· 약 2분
Jeonghun Kim
Frontend Developer
npm i -g express-generator

# express 프레임워크 기반 워크스페이스 폴더 생성
express [폴더명] --view=[뷰엔진]
cd [폴더명]

npm install

express-generator 폴더 구조

bin/www

var app = require('../app');  
var debug = require('debug')('learn-express:server');  
var http = require('http');
  • app : express() 인스턴스. app.set(키,값) 형태로 데이터를 저장할 수 있으며 app.get(키)로 가져올 수 있다.
  • debug : 콘솔에 로그를 남길 수 있는 모듈

"Node.js" 태그로 연결된 2개 게시물개의 게시물이 있습니다.

Node.js 및 백엔드

모든 태그 보기