亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

characters

概述

第一個 服務器 的例子就從 “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í)行。

Previous article: Next article: