在线观看不卡亚洲电影_亚洲妓女99综合网_91青青青亚洲娱乐在线观看_日韩无码高清综合久久

鍍金池/ 教程/ HTML/ 概述
模塊
斷言測試
Buffer
Smalloc
TTY
概述
REPL
HTTP
DNS
路徑
集群
TLS/SSL
系統(tǒng)
加密
調(diào)試器
進程
Punycode
虛擬機
HTTPS
網(wǎng)絡(luò)
Query String
C/C++ 插件
實用工具
文件系統(tǒng)
Zlib
子進程
UDP/Datagram Sockets
定時器
逐行讀取
字符串解碼器
全局對象
事件
URL
控制臺

概述

第一個 服務(wù)器 的例子就從 “Hello World” 開始:

var http = require('http');

http.createServer(function (request, response) {
  response.writeHead(200, {'Content-Type': 'text/plain'});
  response.end('Hello World\n');
}).listen(8124);

console.log('Server running at http://127.0.0.1:8124/');

把代碼拷貝到example.js文件里,用 node 程序執(zhí)行

> node example.js
Server running at http://127.0.0.1:8124/

文檔中所有的例子都可以這么執(zhí)行。

上一篇:虛擬機下一篇:DNS