허당 레몬도리
Node.js Server 실행 시키기
가. 언어유형/Node.js 2015. 3. 31. 11:16

아꿈사 스터디 블로그에서 꽃집총각님이 작성하신 글을 보고 직접 구현해 보았습니다.원본 주소 : http://cafe.naver.com/architect1/2454 var app = require('http').createServer(handler) , fs = require('fs') , exec = require( 'child_process' )app.listen(8080);function handler (req, res) { fs.readFile(__dirname + '/index.html', function (err, data) { if (err) { res.writeHead(500); return res.end('Error loading index.html'); } res.writeHead(200..