[Node.js] WEB Server 띄우기 [Node.js로 HTTP 서버 기동하기]
·
◎ JavaScript/Node.js🫒
- Node.js로 HTTP 서버 기동하기const http = require('http');// http 서버 생성http .createServer((req, res) => { // 클라이언트에 반환할 내용을 쓴다. res.write('hello world\n'); // 클라이언트에 내용을 송신 res.end(); }) .listen(3000); // 포트번호 3000