공부/node.js
-
node.js를 이용해서 간단한 웹 서버 만들기!공부/node.js 2021. 4. 21. 00:22
node.js와 express모듈을 사용해서 간단한 웹 서버를 만들어 본다. 1. node.js를 설치한다. http://www.nodejs.org 페이지에서 운영체제에 맞는 설치파일을 다운받는다. 설치가 완료되면 node.js가 설치된 디렉토리를 환경변수 PATH에 추가한다. [고급 시스템 설정 보기] - [환경 변수] - [시스템 변수] - PATH 선택 후 [편집] 클릭. [새로 만들기] - node.js가 설치된 디렉토리 입력 - [확인] 클릭. cmd창에 node를 입력하여 node.js가 제대로 설치되었는지를 확인한다. 2. node.js 프로젝트를 실행할 폴더를 하나 생성한다. 난 C:\nodejs_temp\210420_proj 로 디렉토리를 지정했다. 3. Visual Studio Code..