Windows에서 Node.js를 실행하여 Hello world를 브라우저에 표시하는 방법
2947 단어 HelloWorldWindowsNode.js
또한, Windows상에서는, 인스톨을 실시하지 않는 실행 파일을 이용하여 가동시키는 것으로 한다.
1.Node.js 사이트에 접속한다.
htps : // 그래서 js. 오 rg / 그럼 /

2. "다른 버전" 중 하나를 누르십시오.
※ 버튼을 눌러 대상 파일은 인스톨러 파일이 다운로드되어 버린다.
3. 'Windows Binary(.zip)'의 '64-bit'을 누릅니다.

4. 적절한 폴더에 다운로드하여 압축을 풉니 다.
※ 이하의 화상은 참고 화상이기 때문에, 이 폴더를 작성할 필요는 없다.

5. 적절한 폴더에 js 파일을 만듭니다.
※ 이하의 화상은 참고 화상이기 때문에, 이 폴더에 작성할 필요는 없다.

6.js를 다음과 같이 기술하고 저장한다.

コマンド
const http = require('http');
const PORT = 90;
http.createServer((request, response) => {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World!\nThis site is created in Node.js.');
}).listen(PORT);
console.log(`Server running at http://localhost:${PORT}/`);
7. 명령 프롬프트를 시작하고 다음과 같이 명령을 실행합니다.

텍스트
C:\000_MySpace\003_liferay_server_only\node-v6.11.2-win-x64\node.exe C:\tmp\example.js
8. 보안 대화 상자가 표시되면 "액세스 허용"을 누릅니다.

9.js내에 액세스용 URL을 정의했기 때문에, URL을 표시된다.

10. URL에 액세스하여 표시되는지 확인합니다.
Reference
이 문제에 관하여(Windows에서 Node.js를 실행하여 Hello world를 브라우저에 표시하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/KOJI-YAMAMOTO/items/4d189b2e44b5ffe5827a
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
※ 버튼을 눌러 대상 파일은 인스톨러 파일이 다운로드되어 버린다.
3. 'Windows Binary(.zip)'의 '64-bit'을 누릅니다.

4. 적절한 폴더에 다운로드하여 압축을 풉니 다.
※ 이하의 화상은 참고 화상이기 때문에, 이 폴더를 작성할 필요는 없다.

5. 적절한 폴더에 js 파일을 만듭니다.
※ 이하의 화상은 참고 화상이기 때문에, 이 폴더에 작성할 필요는 없다.

6.js를 다음과 같이 기술하고 저장한다.

コマンド
const http = require('http');
const PORT = 90;
http.createServer((request, response) => {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World!\nThis site is created in Node.js.');
}).listen(PORT);
console.log(`Server running at http://localhost:${PORT}/`);
7. 명령 프롬프트를 시작하고 다음과 같이 명령을 실행합니다.

텍스트
C:\000_MySpace\003_liferay_server_only\node-v6.11.2-win-x64\node.exe C:\tmp\example.js
8. 보안 대화 상자가 표시되면 "액세스 허용"을 누릅니다.

9.js내에 액세스용 URL을 정의했기 때문에, URL을 표시된다.

10. URL에 액세스하여 표시되는지 확인합니다.
Reference
이 문제에 관하여(Windows에서 Node.js를 실행하여 Hello world를 브라우저에 표시하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/KOJI-YAMAMOTO/items/4d189b2e44b5ffe5827a
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)
※ 이하의 화상은 참고 화상이기 때문에, 이 폴더를 작성할 필요는 없다.

5. 적절한 폴더에 js 파일을 만듭니다.
※ 이하의 화상은 참고 화상이기 때문에, 이 폴더에 작성할 필요는 없다.

6.js를 다음과 같이 기술하고 저장한다.

コマンド
const http = require('http');
const PORT = 90;
http.createServer((request, response) => {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World!\nThis site is created in Node.js.');
}).listen(PORT);
console.log(`Server running at http://localhost:${PORT}/`);
7. 명령 프롬프트를 시작하고 다음과 같이 명령을 실행합니다.

텍스트
C:\000_MySpace\003_liferay_server_only\node-v6.11.2-win-x64\node.exe C:\tmp\example.js
8. 보안 대화 상자가 표시되면 "액세스 허용"을 누릅니다.

9.js내에 액세스용 URL을 정의했기 때문에, URL을 표시된다.

10. URL에 액세스하여 표시되는지 확인합니다.
Reference
이 문제에 관하여(Windows에서 Node.js를 실행하여 Hello world를 브라우저에 표시하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/KOJI-YAMAMOTO/items/4d189b2e44b5ffe5827a
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)

コマンド
const http = require('http');
const PORT = 90;
http.createServer((request, response) => {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World!\nThis site is created in Node.js.');
}).listen(PORT);
console.log(`Server running at http://localhost:${PORT}/`);
7. 명령 프롬프트를 시작하고 다음과 같이 명령을 실행합니다.

텍스트
C:\000_MySpace\003_liferay_server_only\node-v6.11.2-win-x64\node.exe C:\tmp\example.js
8. 보안 대화 상자가 표시되면 "액세스 허용"을 누릅니다.

9.js내에 액세스용 URL을 정의했기 때문에, URL을 표시된다.

10. URL에 액세스하여 표시되는지 확인합니다.
Reference
이 문제에 관하여(Windows에서 Node.js를 실행하여 Hello world를 브라우저에 표시하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/KOJI-YAMAMOTO/items/4d189b2e44b5ffe5827a
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)

9.js내에 액세스용 URL을 정의했기 때문에, URL을 표시된다.

10. URL에 액세스하여 표시되는지 확인합니다.
Reference
이 문제에 관하여(Windows에서 Node.js를 실행하여 Hello world를 브라우저에 표시하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다
https://qiita.com/KOJI-YAMAMOTO/items/4d189b2e44b5ffe5827a
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)

Reference
이 문제에 관하여(Windows에서 Node.js를 실행하여 Hello world를 브라우저에 표시하는 방법), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/KOJI-YAMAMOTO/items/4d189b2e44b5ffe5827a텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)