본문 바로가기
Front/node.js

windows] express 셋팅

by 태하팍 2014. 4. 17.
반응형



HTTP 기본 모듈로 웹서버를 작성 했지만 HTTP모듈은 로우레벨 API만 제공하므로 사용하기 편리하지 않다.

그래서 노드에도 웹 프레임워크가 있다.

그중 인기 있는 것이 바로 "express" 이다.


익스프레스 : http://expressjs.com/

                  TJ Holowaychuk 이 만든 오픈소스 경량 웹 프레임워크


환경 : window 7

         node (window ver) 설치 된 상태



설치 : 


cmd 커맨트 창을 열고 C:\Program Files\nodejs 가 있는 곳으로 간다.(npm이 있는 곳이다.)

아래와 같이 npm install -g or npm install -g express 명령어로 설치를 한다.

 

C:\Program Files\nodejs>npm install -g express

npm http GET https://registry.npmjs.org/express

npm http 200 https://registry.npmjs.org/express

npm http GET https://registry.npmjs.org/express/-/express-4.0.0.tgz

npm http 200 https://registry.npmjs.org/express/-/express-4.0.0.tgz

npm http GET https://registry.npmjs.org/parseurl/1.0.1

npm http GET https://registry.npmjs.org/accepts/1.0.0

npm http GET https://registry.npmjs.org/type-is/1.0.0

npm http GET https://registry.npmjs.org/range-parser/1.0.0

npm http GET https://registry.npmjs.org/cookie/0.1.0

npm http GET https://registry.npmjs.org/buffer-crc32/0.2.1

npm http GET https://registry.npmjs.org/fresh/0.2.2

npm http GET https://registry.npmjs.org/methods/0.1.0

npm http GET https://registry.npmjs.org/send/0.2.0

npm http GET https://registry.npmjs.org/cookie-signature/1.0.3

npm http GET https://registry.npmjs.org/merge-descriptors/0.0.2

npm http GET https://registry.npmjs.org/utils-merge/1.0.0

npm http GET https://registry.npmjs.org/escape-html/1.0.1

npm http GET https://registry.npmjs.org/qs/0.6.6

npm http GET https://registry.npmjs.org/serve-static/1.0.1

npm http GET https://registry.npmjs.org/path-to-regexp/0.1.2

npm http GET https://registry.npmjs.org/debug

npm http 200 https://registry.npmjs.org/parseurl/1.0.1

npm http 200 https://registry.npmjs.org/range-parser/1.0.0

npm http 200 https://registry.npmjs.org/type-is/1.0.0

npm http 200 https://registry.npmjs.org/accepts/1.0.0

npm http 200 https://registry.npmjs.org/cookie/0.1.0

npm http GET https://registry.npmjs.org/parseurl/-/parseurl-1.0.1.tgz

npm http GET https://registry.npmjs.org/range-parser/-/range-parser-1.0.0.tgz

npm http GET https://registry.npmjs.org/accepts/-/accepts-1.0.0.tgz

npm http GET https://registry.npmjs.org/type-is/-/type-is-1.0.0.tgz

npm http GET https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz

npm http 200 https://registry.npmjs.org/parseurl/-/parseurl-1.0.1.tgz

npm http 200 https://registry.npmjs.org/range-parser/-/range-parser-1.0.0.tgz

npm http 200 https://registry.npmjs.org/accepts/-/accepts-1.0.0.tgz

npm http 200 https://registry.npmjs.org/fresh/0.2.2

npm http 200 https://registry.npmjs.org/type-is/-/type-is-1.0.0.tgz

npm http 200 https://registry.npmjs.org/methods/0.1.0

npm http 200 https://registry.npmjs.org/buffer-crc32/0.2.1

npm http 200 https://registry.npmjs.org/cookie/-/cookie-0.1.0.tgz

npm http 200 https://registry.npmjs.org/send/0.2.0

npm http GET https://registry.npmjs.org/methods/-/methods-0.1.0.tgz

npm http GET https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz

npm http GET https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.1.tgz

npm http GET https://registry.npmjs.org/send/-/send-0.2.0.tgz

npm http 200 https://registry.npmjs.org/cookie-signature/1.0.3

npm http GET https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.

3.tgz

npm http 200 https://registry.npmjs.org/merge-descriptors/0.0.2

npm http 200 https://registry.npmjs.org/fresh/-/fresh-0.2.2.tgz

npm http 200 https://registry.npmjs.org/escape-html/1.0.1

npm http 200 https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.1.tgz

npm http 200 https://registry.npmjs.org/qs/0.6.6

npm http 200 https://registry.npmjs.org/methods/-/methods-0.1.0.tgz

npm http 200 https://registry.npmjs.org/send/-/send-0.2.0.tgz

npm http GET https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-

0.2.tgz

npm http GET https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz

npm http GET https://registry.npmjs.org/qs/-/qs-0.6.6.tgz

npm http 200 https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.

3.tgz

npm http 200 https://registry.npmjs.org/utils-merge/1.0.0

npm http 200 https://registry.npmjs.org/serve-static/1.0.1

npm http GET https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz

npm http GET https://registry.npmjs.org/serve-static/-/serve-static-1.0.1.tgz

npm http 200 https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-

0.2.tgz

npm http 200 https://registry.npmjs.org/debug

npm http 200 https://registry.npmjs.org/qs/-/qs-0.6.6.tgz

npm http 200 https://registry.npmjs.org/escape-html/-/escape-html-1.0.1.tgz

npm http GET https://registry.npmjs.org/debug/-/debug-0.8.0.tgz

npm http 200 https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz

npm http 200 https://registry.npmjs.org/path-to-regexp/0.1.2

npm http 200 https://registry.npmjs.org/serve-static/-/serve-static-1.0.1.tgz

npm http GET https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.2.

z

npm http 200 https://registry.npmjs.org/debug/-/debug-0.8.0.tgz

npm http 200 https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.2.

z

npm http GET https://registry.npmjs.org/mime

npm http GET https://registry.npmjs.org/send/0.1.4

npm http GET https://registry.npmjs.org/mime

npm http GET https://registry.npmjs.org/negotiator

npm http 200 https://registry.npmjs.org/send/0.1.4

npm http GET https://registry.npmjs.org/send/-/send-0.1.4.tgz

npm http 200 https://registry.npmjs.org/mime

npm http GET https://registry.npmjs.org/mime/-/mime-1.2.11.tgz

npm http 200 https://registry.npmjs.org/mime

npm http 200 https://registry.npmjs.org/send/-/send-0.1.4.tgz

npm http 200 https://registry.npmjs.org/negotiator

npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.11.tgz

npm http GET https://registry.npmjs.org/negotiator/-/negotiator-0.3.0.tgz

npm http 200 https://registry.npmjs.org/negotiator/-/negotiator-0.3.0.tgz

npm http GET https://registry.npmjs.org/fresh/0.2.0

npm http GET https://registry.npmjs.org/range-parser/0.0.4

npm http 200 https://registry.npmjs.org/range-parser/0.0.4

npm http GET https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz

npm http 200 https://registry.npmjs.org/fresh/0.2.0

npm http GET https://registry.npmjs.org/fresh/-/fresh-0.2.0.tgz

npm http 200 https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz

npm http 200 https://registry.npmjs.org/fresh/-/fresh-0.2.0.tgz

express@4.0.0 C:\Users\acet\AppData\Roaming\npm\node_modules\express

├── parseurl@1.0.1

├── methods@0.1.0

├── utils-merge@1.0.0

├── merge-descriptors@0.0.2

├── escape-html@1.0.1

├── debug@0.8.0

├── cookie-signature@1.0.3

├── fresh@0.2.2

├── qs@0.6.6

├── range-parser@1.0.0

├── buffer-crc32@0.2.1

├── path-to-regexp@0.1.2

├── cookie@0.1.0

├── send@0.2.0 (mime@1.2.11)

├── type-is@1.0.0 (mime@1.2.11)

├── accepts@1.0.0 (mime@1.2.11, negotiator@0.3.0)

└── serve-static@1.0.1 (send@0.1.4)


                    --- 설치 완료 ---

설치완료 후 커맨드라인에서 express 명령어를 사용 할 수 있다.
express [옵션] [경로]

help : express -h


반응형