console input

    [Node.js] console input / 404 not found 출력 / file list 가져오기

    [Node.js] console input / 404 not found 출력 / file list 가져오기 console input 받는 법 var argv = process.argv; console.log(argv[2]); argv[0]과 argv[1]에는 node의 경로, file의 경로가 들어가있다. 따라서 argv[2]부터 입력해준 input 값이 들어가는 것이다. 404 not found 출력하는 방법 var url = require('url'); var app = http.createServer(function(request,response){ var pathname = url.parse(request.url, true).pathname; if(pathname === '/') { ... } e..