전체 > nodejs시작화면 (1) Nodejs ex01: NodeJs서버실행 후 첫 화면 출력 안녕하세요. 각성한 데브키라입니다. nodejs실행 후 첫 화면을 출력해 봅시다.vscode프로젝트 폴더에서 js파일을 작성한 다음 터미널창에서 실행명령어를 입력하면 서버가 실행됩니다.1. 함수를 별도로 정의 후 호출하는 방식입니다.[ main01.js ] 터미널실행 명령어 : npx supervisor main01브라우져접속 : http://localhost:3000/const http = require("http")function test(req, res){ console.log(req.url) //url경로로 분기해서 자바controller처럼 서용가능 console.log("HTTP서버 연동") res.setHeader("Content-Type", "text/plain; chars.. 이전 1 다음