NodeJS (34) 썸네일형 리스트형 http 모듈과 웹 서버 띄우기 웹 서버 띄우기 node.js는 http 모듈을 이용하여 간단하게 웹 서버를 만들 수 있고 크게 3부분으로 나누어 볼 수 있습니다. const http = require('http'); http.createServer(function (req, res) { res.writeHead(200); res.end('hello world'); }).listen(3000, function(){ console.log('server on : 3000port') }); 1) 모듈 호출, 모듈을 사용할 준비를 합니다. const http = require('http'); 2) 서버 생성 createServer(function (req, res) { res.writeHead(200); res.end('hello world'.. Windows10에서 Node.js 설치하기 node.js 설치 1. https://nodejs.org/ko/ 접속 Node.js Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine. nodejs.org 오늘 (2019.12.26) 기준 1) 12.14.0 LTS와 2) 13.5.0 Current 현재 최신 버전 2개중 아무거나 설치하면 되지만 저는 안정적인 12.14.0 LTS 버전을 설치를 권장합니다. LTS ( Long Term Supported ) 장기적으로 안정적이고 신뢰도가 높은 지원이 보장되는 버전입니다. 짝수( 12.x.x )가 LTS 버전이 됩니다. Current 현재 최신 버전 최신 기능을 제공하므로 업데이트가 잦고 기능이 변경될 가능성이 높기 때문에 간.. 이전 1 2 3 4 5 다음