'분류 전체보기'에 해당되는 글 396건

  1. 2015.03.25 node js url로 페이지 이동구분 주기
  2. 2015.03.25 node js 쿠키에 값 넣기
  3. 2015.03.25 node js 이미지를 서비스하는경우
  4. 2015.03.25 노드 js html 서비스
  5. 2015.03.24 웹서비스 기본 예제
  6. 2015.02.03 데이터의 과정

아래소스는 url 로 요청을 각각 구분 주어서 서비스 할 수 있다 



var http= require('http');

var fs=require('fs');

var url=require('url');


http.createServer(function(request,response){

var pathname=url.parse(request.url).pathname;

//페이지 구분 

if(pathname =='/'){

fs.readFile('index.html',function(error , data){

response.writeHead(200 , {'Content-Type': 'text/html'});

response.end(data);

});

}else if(pathname == '/otherpage'){

/*console.log('/other here');*/

fs.readFile('otherpage.html',function(error , data){

response.writeHead(200 , {'Content-Type': 'text/html'});

response.end(data);

});

}

}).listen(52275 ,function(){

console.log('runnig server at http://127.0.0.1:52275');

});


html 파일을 두개 만들어 놓고 조건에 따라서 해당 서비스를 해주는 화면 

결과 값은 아래와 같다 






'Node js' 카테고리의 다른 글

nodejs jade파일에 데이타 전달 예제  (0) 2015.03.26
npm install  (0) 2015.03.25
node js 이미지를 서비스하는경우  (0) 2015.03.25
노드 js html 서비스  (0) 2015.03.25
웹서비스 기본 예제  (0) 2015.03.24
Posted by 이상욱1
,

var http=require('http');


http.createServer(function(request, response){

var date= new Date();

date.setDate(date.getDate()+7);

response.writeHead(200, {'Content-Type':'text/html','Set-Cookie':[

'breakefast=toast; Expires='+date.toUTCString(),'dinner=chicken']});

response.end('<h1>'+request.headers.cookie+'</h1>');

}).listen(52275, function(){

console.log('server running at http://127.0.0.1:52275');

});

결과 값 은 아래와 같다  처음에는 클라이언트는 쿠키값을 안가지고 있어서 없는  값이 나오고 두번째 부터 클라이언트가 쿠키값을 가지고 있기 때문에  아래와 같은 결과가 나온다 



Posted by 이상욱1
,

var fs=require('fs');


var http=require('http');


http.createServer(function(request , response){

fs.readFile('beacon.png',function(error  , data){

response.writeHead(200,{'Content-Type':'image/png'})

response.end(data);

});

}).listen(52275,function(){

console.log('server running at http://127.0.0.1:52275');

});



음악을 서비스하는경우  content -type 부분의 image/를  'audio/mp3'로 바꿔주면 된다 

'Node js' 카테고리의 다른 글

nodejs jade파일에 데이타 전달 예제  (0) 2015.03.26
npm install  (0) 2015.03.25
node js url로 페이지 이동구분 주기  (0) 2015.03.25
노드 js html 서비스  (0) 2015.03.25
웹서비스 기본 예제  (0) 2015.03.24
Posted by 이상욱1
,

노드 js html 서비스

Node js 2015. 3. 25. 09:51

var fs=require('fs');

console.log('1');

var http=require('http');

console.log('2');


http.createServer(function(request , response){

console.log('3');

fs.readFile('HTMLPage.html' ,function(error, data){

console.log('4');

response.writeHead(200 , {'Content-Type':'text/html'});

console.log('5');

console.log('ddd');

response.end(data);

console.log('6');

});

}).listen(52277, function(){

console.log('server runnig http://127.0.0.1:52277');

});

'Node js' 카테고리의 다른 글

nodejs jade파일에 데이타 전달 예제  (0) 2015.03.26
npm install  (0) 2015.03.25
node js url로 페이지 이동구분 주기  (0) 2015.03.25
node js 이미지를 서비스하는경우  (0) 2015.03.25
웹서비스 기본 예제  (0) 2015.03.24
Posted by 이상욱1
,

웹서비스 기본 예제

Node js 2015. 3. 24. 18:45

require('http').createServer(function (request , response) {

//응답합니다

response.writeHead(200, {'Content-Type':'text/html'});

response.end('<h1> hello web server with nose.js</h1>');

}).listen(52275,function(){

console.log('server runnig at http://127.0.0.1:52275');

})


'Node js' 카테고리의 다른 글

nodejs jade파일에 데이타 전달 예제  (0) 2015.03.26
npm install  (0) 2015.03.25
node js url로 페이지 이동구분 주기  (0) 2015.03.25
node js 이미지를 서비스하는경우  (0) 2015.03.25
노드 js html 서비스  (0) 2015.03.25
Posted by 이상욱1
,

하둡 프로젝트를 하기 위해서는 기본적으로 알아야 할 내용 데이터와 관련되서 일련의 

과정은  아래 와 같은 식으로 되어있다 즉  수집 ,저장, 관리, 처리 , 분석 , 표현을 하는 데이터와 관련된 일련의 과정으로 구성 되어있다. 

생성

내부데이터

외부데이터

수집

크롤링

ETL

(Extraction, Transformation, Loading)

저장

NoSQL, 데이터베이스

스토리지

관계형 데이터베이스

관리

파티셔닝

메타스토어

처리

맵리듀스

워크플로우

실시간 이벤트 처리

분석

마이닝

기계학습

통계

표현

가시화


'Hadoop Project ' 카테고리의 다른 글

네이버 데이터연구소  (0) 2016.01.15
Posted by 이상욱1
,