{"id":120,"date":"2022-02-20T15:35:06","date_gmt":"2022-02-20T07:35:06","guid":{"rendered":"https:\/\/lmceric.top\/?p=120"},"modified":"2022-05-19T13:19:49","modified_gmt":"2022-05-19T05:19:49","slug":"node-js%e5%88%9d%e8%af%86","status":"publish","type":"post","link":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/","title":{"rendered":"Node.js\u521d\u8bc6"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u4e4b\u524d\u5199\u524d\u540e\u7aef\u5206\u79bb\u7684\u670d\u52a1\u5668\u7684\u65f6\u5019\u63a5\u89e6\u8fc7\u4e00\u70b9\u70b9Node.js\uff0c\u67e5\u4e86\u70b9\u8d44\u6599\u3002\u8fd9\u91cc\u5c31\u628a\u5b66\u5230\u7684\u4e00\u4e9b\u4e1c\u897f\u8bb0\u5f55\u4e0b\u6765(<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"node-js\u7b80\u4ecb\">Node.js\u7b80\u4ecb<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b80\u5355\u7684\u8bf4 Node.js \u5c31\u662f\u8fd0\u884c\u5728\u670d\u52a1\u7aef\u7684 JavaScript\u3002Node.js \u662f\u4e00\u4e2a\u57fa\u4e8eChrome JavaScript \u8fd0\u884c\u65f6\u5efa\u7acb\u7684\u4e00\u4e2a\u5e73\u53f0\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Node.js\u662f\u4e00\u4e2a\u4e8b\u4ef6\u9a71\u52a8I\/O\u670d\u52a1\u7aefJavaScript\u73af\u5883\uff0c\u57fa\u4e8eGoogle\u7684V8\u5f15\u64ce\uff0cV8\u5f15\u64ce\u6267\u884cJavascript\u7684\u901f\u5ea6\u975e\u5e38\u5feb\uff0c\u6027\u80fd\u975e\u5e38\u597d\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u73af\u5883\u642d\u5efa\">\u73af\u5883\u642d\u5efa<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u7684\u5f00\u53d1\u73af\u5883\u662fwindows10+vscode<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u5b89\u88c5node-js\">\u5b89\u88c5Node.js<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u63a8\u8350\u4f7f\u7528LTS(\u957f\u671f\u652f\u6301\u7248\u672c)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Node.js\u4e0b\u8f7d\u5730\u5740: <a href=\"https:\/\/nodejs.org\/en\/download\/\">https:\/\/nodejs.org\/en\/download\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f60\u53ef\u4ee5\u6839\u636e\u4e0d\u540c\u5e73\u53f0\u7cfb\u7edf\u9009\u62e9\u4f60\u9700\u8981\u7684 Node.js \u5b89\u88c5\u5305\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Node.js \u5386\u53f2\u7248\u672c\u4e0b\u8f7d\u5730\u5740\uff1a<a href=\"https:\/\/nodejs.org\/dist\/\">https:\/\/nodejs.org\/dist\/<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6ce8\u610f\uff1a<\/strong>Linux \u4e0a\u5b89\u88c5 Node.js \u9700\u8981\u5b89\u88c5 Python 2.6 \u6216 2.7 \uff0c\u4e0d\u5efa\u8bae\u5b89\u88c5 Python 3.0 \u4ee5\u4e0a\u7248\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b89\u88c5\u5b8c\u6210\u540e\u5728\u547d\u4ee4\u884c\u8f93\u5165<code>node<\/code>\u53ef\u4ee5\u8fdb\u5165node\u63a7\u5236\u53f0\uff0c\u8f93\u5165<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"java\" class=\"language-java\">console.log(\"Hello World!\");<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u6d4b\u8bd5\u5b89\u88c5<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"linux\u5b89\u88c5\">Linux\u5b89\u88c5<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u76f4\u63a5\u4f7f\u7528\u5df2\u7f16\u8bd1\u597d\u7684\u5305\">\u76f4\u63a5\u4f7f\u7528\u5df2\u7f16\u8bd1\u597d\u7684\u5305<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Node \u5b98\u7f51\u5df2\u7ecf\u628a linux \u4e0b\u8f7d\u7248\u672c\u66f4\u6539\u4e3a\u5df2\u7f16\u8bd1\u597d\u7684\u7248\u672c\u4e86\uff0c\u6211\u4eec\u53ef\u4ee5\u76f4\u63a5\u4e0b\u8f7d\u89e3\u538b\u540e\u4f7f\u7528\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">wget https:\/\/nodejs.org\/dist\/v10.9.0\/node-v10.9.0-linux-x64.tar.xz &nbsp;  \/\/ \u4e0b\u8f7d<br>tar xf  node-v10.9.0-linux-x64.tar.xz &nbsp; &nbsp; &nbsp; \/\/ \u89e3\u538b<br>cd node-v10.9.0-linux-x64\/ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  \/\/ \u8fdb\u5165\u89e3\u538b\u76ee\u5f55<br> .\/bin\/node -v &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \/\/ \u6267\u884cnode\u547d\u4ee4 \u67e5\u770b\u7248\u672c<br>v10.9.0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u89e3\u538b\u6587\u4ef6\u7684 bin \u76ee\u5f55\u5e95\u4e0b\u5305\u542b\u4e86 node\u3001npm \u7b49\u547d\u4ee4\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 ln \u547d\u4ee4\u6765\u8bbe\u7f6e\u8f6f\u8fde\u63a5\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">ln -s \/usr\/software\/nodejs\/bin\/npm &nbsp; \/usr\/local\/bin\/ <br>ln -s \/usr\/software\/nodejs\/bin\/node &nbsp; \/usr\/local\/bin\/<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ubuntu-\u6e90\u7801\u5b89\u88c5-node-js\">Ubuntu \u6e90\u7801\u5b89\u88c5 Node.js<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u90e8\u5206\u6211\u4eec\u5c06\u4ecb\u7ecd\u5728 Ubuntu Linux \u4e0b\u4f7f\u7528\u6e90\u7801\u5b89\u88c5 Node.js \u3002 \u5176\u4ed6\u7684 Linux \u7cfb\u7edf\uff0c\u5982 Centos \u7b49\u7c7b\u4f3c\u5982\u4e0b\u5b89\u88c5\u6b65\u9aa4\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728 Github \u4e0a\u83b7\u53d6 Node.js \u6e90\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo git clone https:\/\/github.com\/nodejs\/node.git<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4fee\u6539\u76ee\u5f55\u6743\u9650\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo chmod -R 755 node<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528 <strong>.\/configure<\/strong> \u521b\u5efa\u7f16\u8bd1\u6587\u4ef6\uff0c\u5e76\u6309\u7167\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">cd node<br>sudo .\/configure<br>sudo make<br>sudo make install<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u67e5\u770b node \u7248\u672c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">node --version<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"ubuntu-apt-get-\u547d\u4ee4\u5b89\u88c5\">Ubuntu apt-get \u547d\u4ee4\u5b89\u88c5<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u547d\u4ee4\u683c\u5f0f\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">sudo apt-get install nodejs<br>sudo apt-get install npm<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"centos-\u4e0b\u6e90\u7801\u5b89\u88c5-node-js\">CentOS \u4e0b\u6e90\u7801\u5b89\u88c5 Node.js<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u4e0b\u8f7d\u6e90\u7801\uff0c\u4f60\u9700\u8981\u5728<a href=\"https:\/\/nodejs.org\/en\/download\/\">https:\/\/nodejs.org\/en\/download\/<\/a>\u4e0b\u8f7d\u6700\u65b0\u7684Nodejs\u7248\u672c\uff0c\u672c\u6587\u4ee5v0.10.24\u4e3a\u4f8b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">cd \/usr\/local\/src\/<br>wget http:\/\/nodejs.org\/dist\/v0.10.24\/node-v0.10.24.tar.gz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u89e3\u538b\u6e90\u7801<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">tar zxvf node-v0.10.24.tar.gz<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001 \u7f16\u8bd1\u5b89\u88c5<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">cd node-v0.10.24<br>.\/configure --prefix=\/usr\/local\/node\/0.10.24<br>make<br>make install<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001 \u914d\u7f6eNODE_HOME\uff0c\u8fdb\u5165profile\u7f16\u8f91\u73af\u5883\u53d8\u91cf<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">vim \/etc\/profile<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8bbe\u7f6e nodejs \u73af\u5883\u53d8\u91cf\uff0c\u5728 <em><strong>export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL<\/strong><\/em> \u4e00\u884c\u7684\u4e0a\u9762\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">#set for nodejs<br>export NODE_HOME=\/usr\/local\/node\/0.10.24<br>export PATH=$NODE_HOME\/bin:$PATH<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">:wq\u4fdd\u5b58\u5e76\u9000\u51fa\uff0c\u7f16\u8bd1\/etc\/profile \u4f7f\u914d\u7f6e\u751f\u6548<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">source \/etc\/profile<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u9a8c\u8bc1\u662f\u5426\u5b89\u88c5\u914d\u7f6e\u6210\u529f<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">node -v<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8f93\u51fa v0.10.24 \u8868\u793a\u914d\u7f6e\u6210\u529f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">npm\u6a21\u5757\u5b89\u88c5\u8def\u5f84<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">\/usr\/local\/node\/0.10.24\/lib\/node_modules\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6ce8\uff1a<\/strong>Nodejs \u5b98\u7f51\u63d0\u4f9b\u4e86\u7f16\u8bd1\u597d\u7684 Linux \u4e8c\u8fdb\u5236\u5305\uff0c\u4f60\u4e5f\u53ef\u4ee5\u4e0b\u8f7d\u4e0b\u6765\u76f4\u63a5\u5e94\u7528\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"ide\u73af\u5883\">IDE\u73af\u5883<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4f7f\u7528\u7684\u662fvscode\u73af\u5883\uff0c\u4e0d\u4e3a\u522b\u7684\uff0c\u5c31\u56e0\u4e3avscode\u7684\u9ad8\u6027\u80fd\u548c\u5f3a\u5927\u7684\u529f\u80fd<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5176\u5b83IDE\u4e5f\u53ef\u4ee5\uff0c\u4f8b\u5982Jetbrain\u5bb6\u7684IDEA\u4e4b\u7c7b\u7684<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u521b\u5efa\u7b2c\u4e00\u4e2a\u5e94\u7528\">\u521b\u5efa\u7b2c\u4e00\u4e2a\u5e94\u7528<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u65b0\u5efa\u4e00\u4e2a\u7a7a\u767d\u76ee\u5f55\uff0c\u5e76\u5728\u6b64\u76ee\u5f55\u4e0b\u65b0\u5efa<code>app.js<\/code>\u6587\u4ef6<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7f16\u8f91\u6587\u4ef6\u5e76\u8f93\u5165<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">var msg = \"Hello World\";<br>console.log(msg);<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u8be5\u76ee\u5f55\u4e0b\u6253\u5f00\u7ec8\u7aef\uff0c\u8f93\u5165<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">node app.js<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u65f6app.js\u4f1a\u8fd0\u884c\u5e76\u8f93\u51fa<code>Hello World<\/code>\u5b57\u6837<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684http\u670d\u52a1\u5668\">\u5b9e\u73b0\u4e00\u4e2a\u7b80\u5355\u7684HTTP\u670d\u52a1\u5668<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u6211\u4eec\u521b\u5efa Node.js \u7b2c\u4e00\u4e2a &#8220;Hello, World!&#8221; \u5e94\u7528\u524d\uff0c\u8ba9\u6211\u4eec\u5148\u4e86\u89e3\u4e0b Node.js \u5e94\u7528\u662f\u7531\u54ea\u51e0\u90e8\u5206\u7ec4\u6210\u7684\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>\u5f15\u5165 required \u6a21\u5757\uff1a<\/strong>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 <strong>require<\/strong> \u6307\u4ee4\u6765\u8f7d\u5165 Node.js \u6a21\u5757\u3002<\/li><li><strong>\u521b\u5efa\u670d\u52a1\u5668\uff1a<\/strong>\u670d\u52a1\u5668\u53ef\u4ee5\u76d1\u542c\u5ba2\u6237\u7aef\u7684\u8bf7\u6c42\uff0c\u7c7b\u4f3c\u4e8e Apache \u3001Nginx \u7b49 HTTP \u670d\u52a1\u5668\u3002<\/li><li><strong>\u63a5\u6536\u8bf7\u6c42\u4e0e\u54cd\u5e94\u8bf7\u6c42<\/strong> \u670d\u52a1\u5668\u5f88\u5bb9\u6613\u521b\u5efa\uff0c\u5ba2\u6237\u7aef\u53ef\u4ee5\u4f7f\u7528\u6d4f\u89c8\u5668\u6216\u7ec8\u7aef\u53d1\u9001 HTTP \u8bf7\u6c42\uff0c\u670d\u52a1\u5668\u63a5\u6536\u8bf7\u6c42\u540e\u8fd4\u56de\u54cd\u5e94\u6570\u636e\u3002<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u5f15\u5165require\u6a21\u5757\">\u5f15\u5165require\u6a21\u5757<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u6211\u4eec\u4f7f\u7528 <strong>require<\/strong> \u6307\u4ee4\u6765\u8f7d\u5165 http \u6a21\u5757\uff0c\u5e76\u5c06\u5b9e\u4f8b\u5316\u7684 HTTP \u8d4b\u503c\u7ed9\u53d8\u91cf http\uff0c\u5b9e\u4f8b\u5982\u4e0b:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">var http = require(\"http\");<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"\u521b\u5efa\u670d\u52a1\u5668\">\u521b\u5efa\u670d\u52a1\u5668<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u6765\u6211\u4eec\u4f7f\u7528 http.createServer() \u65b9\u6cd5\u521b\u5efa\u670d\u52a1\u5668\uff0c\u5e76\u4f7f\u7528 listen \u65b9\u6cd5\u7ed1\u5b9a 8888 \u7aef\u53e3\u3002 \u51fd\u6570\u901a\u8fc7 request, response \u53c2\u6570\u6765\u63a5\u6536\u548c\u54cd\u5e94\u6570\u636e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5b9e\u4f8b\u5982\u4e0b\uff0c\u5728\u4f60\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\u521b\u5efa\u4e00\u4e2a\u53eb app.js \u7684\u6587\u4ef6\uff0c\u5e76\u5199\u5165\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"javascript\" class=\"language-javascript\">var http = require('http');<br>\u200b<br>http.createServer(function (request, response) {<br>\u200b<br> &nbsp; &nbsp;\/\/ \u53d1\u9001 HTTP \u5934\u90e8 <br> &nbsp; &nbsp;\/\/ HTTP \u72b6\u6001\u503c: 200 : OK<br> &nbsp; &nbsp;\/\/ \u5185\u5bb9\u7c7b\u578b: text\/plain<br> &nbsp; &nbsp;response.writeHead(200, {'Content-Type': 'text\/plain'});<br>\u200b<br> &nbsp; &nbsp;\/\/ \u53d1\u9001\u54cd\u5e94\u6570\u636e \"Hello World\"<br> &nbsp; &nbsp;response.end('Hello World\\n');<br>}).listen(8888);<br>\u200b<br>\/\/ \u7ec8\u7aef\u6253\u5370\u5982\u4e0b\u4fe1\u606f<br>console.log('Server running at http:\/\/127.0.0.1:8888\/');<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u63a7\u5236\u53f0\u8f93\u5165<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"bash\" class=\"language-bash\">node app.js<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u670d\u52a1\u5668\u4f1a\u5f00\u59cb\u8fd0\u884c<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u65f6\u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee <a href=\"http:\/\/127.0.0.1:8888\">http:\/\/127.0.0.1:8888<\/a> \u4f1a\u770b\u5230Hello World\u5b57\u6837<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6682\u65f6\u5c31\u5199\u8fd9\u4e48\u591a\uff0c\u53ef\u80fd\u540e\u7eed\u4f1a\u589e\u52a0\u5185\u5bb9<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u5199\u524d\u540e\u7aef\u5206\u79bb\u7684\u670d\u52a1\u5668\u7684\u65f6\u5019\u63a5\u89e6\u8fc7\u4e00\u70b9\u70b9Node&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/\">Continue reading<span class=\"screen-reader-text\">Node.js\u521d\u8bc6<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":121,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","footnotes":""},"categories":[11],"tags":[32,16,6],"class_list":["post-120","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tec","tag-node-js","tag-web","tag-6","entry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Node.js\u521d\u8bc6 - LMC\u7684\u4e2a\u4eba\u7ad9<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Node.js\u521d\u8bc6 - LMC\u7684\u4e2a\u4eba\u7ad9\" \/>\n<meta property=\"og:description\" content=\"\u4e4b\u524d\u5199\u524d\u540e\u7aef\u5206\u79bb\u7684\u670d\u52a1\u5668\u7684\u65f6\u5019\u63a5\u89e6\u8fc7\u4e00\u70b9\u70b9Node&#8230;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/\" \/>\n<meta property=\"og:site_name\" content=\"LMC\u7684\u4e2a\u4eba\u7ad9\" \/>\n<meta property=\"article:published_time\" content=\"2022-02-20T07:35:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-19T05:19:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/lmceric.top\/wp-content\/uploads\/2022\/02\/2400\u04451260-rw-blog-node-js.png\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"SimpleAstronaut\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"SimpleAstronaut\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/\"},\"author\":{\"name\":\"SimpleAstronaut\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/#\\\/schema\\\/person\\\/1edca9cfe5ff17dbe947c332a66ee539\"},\"headline\":\"Node.js\u521d\u8bc6\",\"datePublished\":\"2022-02-20T07:35:06+00:00\",\"dateModified\":\"2022-05-19T05:19:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/\"},\"wordCount\":138,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lmceric.top\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/2400\u04451260-rw-blog-node-js.png\",\"keywords\":[\"Node.js\",\"web\",\"\u4e92\u8054\u7f51\"],\"articleSection\":[\"\u6280\u672f\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/\",\"url\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/\",\"name\":\"Node.js\u521d\u8bc6 - LMC\u7684\u4e2a\u4eba\u7ad9\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/lmceric.top\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/2400\u04451260-rw-blog-node-js.png\",\"datePublished\":\"2022-02-20T07:35:06+00:00\",\"dateModified\":\"2022-05-19T05:19:49+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/#\\\/schema\\\/person\\\/1edca9cfe5ff17dbe947c332a66ee539\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/#primaryimage\",\"url\":\"https:\\\/\\\/lmceric.top\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/2400\u04451260-rw-blog-node-js.png\",\"contentUrl\":\"https:\\\/\\\/lmceric.top\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/2400\u04451260-rw-blog-node-js.png\",\"width\":2400,\"height\":1260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/2022\\\/02\\\/20\\\/120\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\\\/\\\/lmceric.top\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Node.js\u521d\u8bc6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/#website\",\"url\":\"https:\\\/\\\/lmceric.top\\\/\",\"name\":\"LMC\u7684\u4e2a\u4eba\u7ad9\",\"description\":\"\u5b64\u5e06\u8fdc\u5f71\u78a7\u7a7a\u5c3d\uff0c\u552f\u89c1\u957f\u6c5f\u5929\u9645\u6d41\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/lmceric.top\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/lmceric.top\\\/#\\\/schema\\\/person\\\/1edca9cfe5ff17dbe947c332a66ee539\",\"name\":\"SimpleAstronaut\",\"sameAs\":[\"http:\\\/\\\/lmceric.top\"],\"url\":\"https:\\\/\\\/lmceric.top\\\/index.php\\\/author\\\/simpleastronaut\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Node.js\u521d\u8bc6 - LMC\u7684\u4e2a\u4eba\u7ad9","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/","og_locale":"zh_CN","og_type":"article","og_title":"Node.js\u521d\u8bc6 - LMC\u7684\u4e2a\u4eba\u7ad9","og_description":"\u4e4b\u524d\u5199\u524d\u540e\u7aef\u5206\u79bb\u7684\u670d\u52a1\u5668\u7684\u65f6\u5019\u63a5\u89e6\u8fc7\u4e00\u70b9\u70b9Node&#8230;","og_url":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/","og_site_name":"LMC\u7684\u4e2a\u4eba\u7ad9","article_published_time":"2022-02-20T07:35:06+00:00","article_modified_time":"2022-05-19T05:19:49+00:00","og_image":[{"width":2400,"height":1260,"url":"https:\/\/lmceric.top\/wp-content\/uploads\/2022\/02\/2400\u04451260-rw-blog-node-js.png","type":"image\/png"}],"author":"SimpleAstronaut","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"SimpleAstronaut","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/#article","isPartOf":{"@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/"},"author":{"name":"SimpleAstronaut","@id":"https:\/\/lmceric.top\/#\/schema\/person\/1edca9cfe5ff17dbe947c332a66ee539"},"headline":"Node.js\u521d\u8bc6","datePublished":"2022-02-20T07:35:06+00:00","dateModified":"2022-05-19T05:19:49+00:00","mainEntityOfPage":{"@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/"},"wordCount":138,"commentCount":0,"image":{"@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/#primaryimage"},"thumbnailUrl":"https:\/\/lmceric.top\/wp-content\/uploads\/2022\/02\/2400\u04451260-rw-blog-node-js.png","keywords":["Node.js","web","\u4e92\u8054\u7f51"],"articleSection":["\u6280\u672f"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/","url":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/","name":"Node.js\u521d\u8bc6 - LMC\u7684\u4e2a\u4eba\u7ad9","isPartOf":{"@id":"https:\/\/lmceric.top\/#website"},"primaryImageOfPage":{"@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/#primaryimage"},"image":{"@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/#primaryimage"},"thumbnailUrl":"https:\/\/lmceric.top\/wp-content\/uploads\/2022\/02\/2400\u04451260-rw-blog-node-js.png","datePublished":"2022-02-20T07:35:06+00:00","dateModified":"2022-05-19T05:19:49+00:00","author":{"@id":"https:\/\/lmceric.top\/#\/schema\/person\/1edca9cfe5ff17dbe947c332a66ee539"},"breadcrumb":{"@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/#primaryimage","url":"https:\/\/lmceric.top\/wp-content\/uploads\/2022\/02\/2400\u04451260-rw-blog-node-js.png","contentUrl":"https:\/\/lmceric.top\/wp-content\/uploads\/2022\/02\/2400\u04451260-rw-blog-node-js.png","width":2400,"height":1260},{"@type":"BreadcrumbList","@id":"https:\/\/lmceric.top\/index.php\/2022\/02\/20\/120\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/lmceric.top\/"},{"@type":"ListItem","position":2,"name":"Node.js\u521d\u8bc6"}]},{"@type":"WebSite","@id":"https:\/\/lmceric.top\/#website","url":"https:\/\/lmceric.top\/","name":"LMC\u7684\u4e2a\u4eba\u7ad9","description":"\u5b64\u5e06\u8fdc\u5f71\u78a7\u7a7a\u5c3d\uff0c\u552f\u89c1\u957f\u6c5f\u5929\u9645\u6d41","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/lmceric.top\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/lmceric.top\/#\/schema\/person\/1edca9cfe5ff17dbe947c332a66ee539","name":"SimpleAstronaut","sameAs":["http:\/\/lmceric.top"],"url":"https:\/\/lmceric.top\/index.php\/author\/simpleastronaut\/"}]}},"jetpack_featured_media_url":"https:\/\/lmceric.top\/wp-content\/uploads\/2022\/02\/2400\u04451260-rw-blog-node-js.png","_links":{"self":[{"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/posts\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/comments?post=120"}],"version-history":[{"count":3,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/posts\/120\/revisions"}],"predecessor-version":[{"id":148,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/posts\/120\/revisions\/148"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/media\/121"}],"wp:attachment":[{"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/media?parent=120"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/categories?post=120"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lmceric.top\/index.php\/wp-json\/wp\/v2\/tags?post=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}