express 비계 (응용 생 성기) (express - generator)
1789 단어 Express 프레임 워 크
express-generator
응용 뼈 대 를 빠르게 만 들 수 있 습 니 다.//
$ npm install express-generator -g
전역 을 설치 하면 express 명령 을 사용 할 수 있 습 니 다.
프로젝트 디 렉 터 리 를 만 들 때 의존 패키지 가 생 성 됩 니 다.
먼저 의존 하 는 가방 을 다운로드 해야만 사용 할 수 있다.
app 。
express apps
다음은 표 시 된 메시지 입 니 다.
f:\ \Nodejs\day5>
warning: the default view engine will not be jade in future releases
warning: use `--view=jade' or `--help' for additional options
create : apps\
create : apps\public\
create : apps\public\javascripts\
create : apps\public\images\
create : apps\public\stylesheets\
create : apps\public\stylesheets\style.css
create : apps\routes\
create : apps\routes\index.js
create : apps\routes\users.js
create : apps\views\
create : apps\views\error.jade
create : apps\views\index.jade
create : apps\views\layout.jade
create : apps\app.js
create : apps\package.json
create : apps\bin\
create : apps\bin\www
change directory:
> cd apps
install dependencies:
> npm install
run the app:
> SET DEBUG=apps:* & npm start
express-generator , ,
cd apps
다운로드 의존 패키지
cnpm install
이렇게 뼈 대 를 다 만 들 었 으 니 시동 을 걸 고 싶다 면,
이렇게 시동 걸 어도 돼 요.
f:\ \Nodejs\day5\apps>npm start
> [email protected] start f:\ \Nodejs\day5\apps
> node ./bin/www
아니면 당신 의 사건 감청 으로 시작 할 수 있 습 니 다. 저 는 'nodemon' 을 사 용 했 습 니 다.
그래서 명령 은
nodemon ./bin/www
이렇게 하면 코드 가 바 뀌 면 자동 으로 다시 시작 할 수 있다.
잘못 되면 연락 주세요. 감사합니다.