Nodejs

 

 

 

 

패키지 json 파일을 만든다.

# npm init


-대문자 안 된다.

# express


#npm install express --save

 

 

var express =require('express');
var http=require('http');

var app=express();

// port 설정
app.set('port', process.env.PORT || 3000);

var server=http.createServer(app).listen(app.get('port'), function(){
    console.log('익스프레스로 웹 서버를 실행함 :' + app.get('port'));
});


 

 

 

 

 

https://github.com/braverokmc79/nodejs_webproject1

 

 

 

 

 

 

 

about author

PHRASE

Level 60  라이트

하나의 눈으로 보는 것보다는 두 개의 눈으로 보는 것이 더 잘 보이고, 하나의 귀로 듣는 것보다는 두 개의 귀로 듣는 것이 더 잘 들린다. 천하의 모든 백성의 실정을 보고 진실된 소리를 듣는 것이 나라를 다스리는 요도(要道)가 된다. -묵자

댓글 ( 4)

댓글 남기기

작성

Nodejs 목록    more