{"id":2596,"date":"2018-03-31T16:03:36","date_gmt":"2018-03-31T08:03:36","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=2596"},"modified":"2018-03-31T16:03:36","modified_gmt":"2018-03-31T08:03:36","slug":"node-%e8%b0%83%e8%af%95%e5%b7%a5%e5%85%b7%e5%85%a5%e9%97%a8%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=2596","title":{"rendered":"Node \u8c03\u8bd5\u5de5\u5177\u5165\u95e8\u6559\u7a0b"},"content":{"rendered":"<p>\n\tJavaScript \u7a0b\u5e8f\u8d8a\u6765\u8d8a\u590d\u6742\uff0c\u8c03\u8bd5\u5de5\u5177\u7684\u91cd\u8981\u6027\u65e5\u76ca\u51f8\u663e\u3002\u5ba2\u6237\u7aef\u811a\u672c\u6709\u6d4f\u89c8\u5668\uff0cNode \u811a\u672c\u600e\u4e48\u8c03\u8bd5\u5462\uff1f\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031901.png\" title=\"\" \/>\n<\/p>\n<p>\n\t2016\u5e74\uff0cNode \u51b3\u5b9a\u5c06 Chrome \u6d4f\u89c8\u5668\u7684&quot;\u5f00\u53d1\u8005\u5de5\u5177&quot;\u4f5c\u4e3a\u5b98\u65b9\u7684\u8c03\u8bd5\u5de5\u5177\uff0c\u4f7f\u5f97 Node \u811a\u672c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u56fe\u5f62\u754c\u9762\u8c03\u8bd5\uff0c\u8fd9\u5927\u5927\u65b9\u4fbf\u4e86\u5f00\u53d1\u8005\u3002\n<\/p>\n<p>\n\t\u672c\u6587\u4ecb\u7ecd\u5982\u4f55\u4f7f\u7528 Node \u811a\u672c\u7684\u8c03\u8bd5\u5de5\u5177\u3002\n<\/p>\n<h2>\n\t\u4e00\u3001\u793a\u4f8b\u7a0b\u5e8f<br \/>\n<\/h2>\n<p>\n\t\u4e3a\u4e86\u65b9\u4fbf\u8bb2\u89e3\uff0c\u4e0b\u9762\u662f\u4e00\u4e2a\u793a\u4f8b\u811a\u672c\u3002\u9996\u5148\uff0c\u65b0\u5efa\u4e00\u4e2a\u5de5\u4f5c\u76ee\u5f55\uff0c\u5e76\u8fdb\u5165\u8be5\u76ee\u5f55\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n$ mkdir debug-demo\r\n$ cd debug-demo\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t\u7136\u540e\uff0c\u751f\u6210<code>package.json<\/code>\u6587\u4ef6\uff0c\u5e76\u5b89\u88c5&nbsp;<a href=\"http:\/\/www.ruanyifeng.com\/blog\/2017\/08\/koa.html\" target=\"_blank\">Koa<\/a>&nbsp;\u6846\u67b6\u548c koa-route \u6a21\u5757\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n$ npm init -y\r\n$ npm install --save koa koa-route\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t\u63a5\u7740\uff0c\u65b0\u5efa\u4e00\u4e2a\u811a\u672c<code>app.js<\/code>\uff0c\u5e76\u5199\u5165\u4e0b\u9762\u7684\u5185\u5bb9\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n\/\/ app.js\r\nconst Koa = require(&#039;koa&#039;);\r\nconst router = require(&#039;koa-route&#039;);\r\n\r\nconst app = new Koa();\r\n\r\nconst main = ctx =&gt; {\r\n  ctx.response.body = &#039;Hello World&#039;;\r\n};\r\n\r\nconst welcome = (ctx, name) =&gt; {\r\n  ctx.response.body = &#039;Hello &#039; + name;\r\n};\r\n\r\napp.use(router.get(&#039;\/&#039;, main));\r\napp.use(router.get(&#039;\/:name&#039;, welcome));\r\n\r\napp.listen(3000);\r\nconsole.log(&#039;listening on port 3000&#039;);\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t\u4e0a\u9762\u4ee3\u7801\u662f\u4e00\u4e2a\u7b80\u5355\u7684 Web \u5e94\u7528\uff0c\u6307\u5b9a\u4e86\u4e24\u4e2a\u8def\u7531\uff0c\u8bbf\u95ee\u540e\u4f1a\u663e\u793a\u4e00\u884c\u6b22\u8fce\u4fe1\u606f\u3002\u5982\u679c\u60f3\u4e86\u89e3\u4ee3\u7801\u7684\u8be6\u7ec6\u542b\u4e49\uff0c\u53ef\u4ee5\u53c2\u8003&nbsp;<a href=\"http:\/\/www.ruanyifeng.com\/blog\/2017\/08\/koa.html\" target=\"_blank\">Koa \u6559\u7a0b<\/a>\u3002\n<\/p>\n<h2>\n\t\u4e8c\u3001\u542f\u52a8\u5f00\u53d1\u8005\u5de5\u5177<br \/>\n<\/h2>\n<p>\n\t\u73b0\u5728\uff0c\u8fd0\u884c\u4e0a\u9762\u7684\u811a\u672c\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n$ node --inspect app.js\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t\u4e0a\u9762\u4ee3\u7801\u4e2d\uff0c<code>--inspect<\/code>\u53c2\u6570\u662f\u542f\u52a8\u8c03\u8bd5\u6a21\u5f0f\u5fc5\u9700\u7684\u3002\u8fd9\u65f6\uff0c\u6253\u5f00\u6d4f\u89c8\u5668\u8bbf\u95ee<code>http:\/\/127.0.0.1:3000<\/code>\uff0c\u5c31\u53ef\u4ee5\u770b\u5230 Hello World \u4e86\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031902.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u63a5\u4e0b\u6765\uff0c\u5c31\u8981\u5f00\u59cb\u8c03\u8bd5\u4e86\u3002\u4e00\u5171\u6709\u4e24\u79cd\u6253\u5f00\u8c03\u8bd5\u5de5\u5177\u7684\u65b9\u6cd5\uff0c\u7b2c\u4e00\u79cd\u662f\u5728 Chrome \u6d4f\u89c8\u5668\u7684\u5730\u5740\u680f\uff0c\u952e\u5165&nbsp;<code>chrome:\/\/inspect<\/code>\u6216\u8005<code>about:inspect<\/code>\uff0c\u56de\u8f66\u540e\u5c31\u53ef\u4ee5\u770b\u5230\u4e0b\u9762\u7684\u754c\u9762\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031903.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u5728 Target \u90e8\u5206\uff0c\u70b9\u51fb inspect \u94fe\u63a5\uff0c\u5c31\u80fd\u8fdb\u5165\u8c03\u8bd5\u5de5\u5177\u4e86\u3002\n<\/p>\n<p>\n\t\u7b2c\u4e8c\u79cd\u8fdb\u5165\u8c03\u8bd5\u5de5\u5177\u7684\u65b9\u6cd5\uff0c\u662f\u5728 http:\/\/127.0.0.1:3000 \u7684\u7a97\u53e3\u6253\u5f00&quot;\u5f00\u53d1\u8005\u5de5\u5177&quot;\uff0c\u9876\u90e8\u5de6\u4e0a\u89d2\u6709\u4e00\u4e2a Node \u7684\u7eff\u8272\u6807\u5fd7\uff0c\u70b9\u51fb\u5c31\u53ef\u4ee5\u8fdb\u5165\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031904.png\" title=\"\" \/>\n<\/p>\n<h2>\n\t\u4e09\u3001\u8c03\u8bd5\u5de5\u5177\u7a97\u53e3<br \/>\n<\/h2>\n<p>\n\t\u8c03\u8bd5\u5de5\u5177\u5176\u5b9e\u5c31\u662f&quot;\u5f00\u53d1\u8005\u5de5\u5177&quot;\u7684\u5b9a\u5236\u7248\uff0c\u7701\u53bb\u4e86\u90a3\u4e9b\u5bf9\u670d\u52a1\u5668\u811a\u672c\u6ca1\u7528\u7684\u90e8\u5206\u3002\n<\/p>\n<p>\n\t\u5b83\u4e3b\u8981\u6709\u56db\u4e2a\u9762\u677f\u3002\n<\/p>\n<blockquote>\n<ul>\n<li>\n\t\t\tConsole\uff1a\u63a7\u5236\u53f0\n\t\t<\/li>\n<li>\n\t\t\tMemory\uff1a\u5185\u5b58\n\t\t<\/li>\n<li>\n\t\t\tProfiler\uff1a\u6027\u80fd\n\t\t<\/li>\n<li>\n\t\t\tSources\uff1a\u6e90\u7801\n\t\t<\/li>\n<\/ul>\n<\/blockquote>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031905.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u8fd9\u4e9b\u9762\u677f\u7684\u7528\u6cd5\uff0c\u57fa\u672c\u4e0a\u8ddf\u6d4f\u89c8\u5668\u73af\u5883\u5dee\u4e0d\u591a\uff0c\u8fd9\u91cc\u53ea\u4ecb\u7ecd Sources \uff08\u6e90\u7801\uff09\u9762\u677f\u3002\n<\/p>\n<h2>\n\t\u56db\u3001\u8bbe\u7f6e\u65ad\u70b9<br \/>\n<\/h2>\n<p>\n\t\u8fdb\u5165 Sources \u9762\u677f\uff0c\u627e\u5230\u6b63\u5728\u8fd0\u884c\u7684\u811a\u672c<code>app.js<\/code>\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031906.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u5728\u7b2c11\u884c\uff08\u4e5f\u5c31\u662f\u4e0b\u9762\u8fd9\u4e00\u884c\uff09\u7684\u884c\u53f7\u4e0a\u70b9\u4e00\u4e0b\uff0c\u5c31\u8bbe\u7f6e\u4e86\u4e00\u4e2a\u65ad\u70b9\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\nctx.response.body = &#039;Hello &#039; + name;\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031907.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u8fd9\u65f6\uff0c\u6d4f\u89c8\u5668\u8bbf\u95ee http:\/\/127.0.0.1:3000\/alice \uff0c\u9875\u9762\u4f1a\u663e\u793a\u6b63\u5728\u7b49\u5f85\u670d\u52a1\u5668\u8fd4\u56de\u3002\u5207\u6362\u5230\u8c03\u8bd5\u5de5\u5177\uff0c\u53ef\u4ee5\u770b\u5230 Node \u4e3b\u7ebf\u7a0b\u5904\u4e8e\u6682\u505c\uff08paused\uff09\u9636\u6bb5\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031908.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u8fdb\u5165 Console \u9762\u677f\uff0c\u8f93\u5165 name\uff0c\u4f1a\u8fd4\u56de alice\u3002\u8fd9\u8868\u660e\u6211\u4eec\u6b63\u5904\u5728\u65ad\u70b9\u5904\u7684\u4e0a\u4e0b\u6587\uff08context\uff09\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031909.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u518d\u5207\u56de Sources \u9762\u677f\uff0c\u53f3\u4fa7\u53ef\u4ee5\u770b\u5230 Watch\u3001Call Stack\u3001Scope\u3001Breakpoints \u7b49\u6298\u53e0\u9879\u3002\u6253\u5f00 Scope \u6298\u53e0\u9879\uff0c\u53ef\u4ee5\u770b\u5230 Local \u4f5c\u7528\u57df\u548c Global \u4f5c\u7528\u57df\u91cc\u9762\u7684\u6240\u6709\u53d8\u91cf\u3002\n<\/p>\n<p>\n\tLocal \u4f5c\u7528\u57df\u91cc\u9762\uff0c\u53d8\u91cf<code>name<\/code>\u7684\u503c\u662f<code>alice<\/code>\uff0c\u53cc\u51fb\u8fdb\u5165\u7f16\u8f91\u72b6\u6001\uff0c\u628a\u5b83\u6539\u6210<code>bob<\/code>\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031910.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u7136\u540e\uff0c\u70b9\u51fb\u9876\u90e8\u5de5\u5177\u680f\u7684\u7ee7\u7eed\u8fd0\u884c\u6309\u94ae\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031911.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u9875\u9762\u4e0a\u5c31\u53ef\u4ee5\u770b\u5230 Hello bob \u4e86\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031912.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u547d\u4ee4\u884c\u4e0b\uff0c\u6309\u4e0b ctrl + c\uff0c\u7ec8\u6b62\u8fd0\u884c<code>app.js<\/code>\u3002\n<\/p>\n<h2>\n\t\u4e94\u3001\u8c03\u8bd5\u975e\u670d\u52a1\u811a\u672c<br \/>\n<\/h2>\n<p>\n\tWeb \u670d\u52a1\u811a\u672c\u4f1a\u4e00\u76f4\u5728\u540e\u53f0\u8fd0\u884c\uff0c\u4f46\u662f\u5927\u90e8\u5206\u811a\u672c\u53ea\u662f\u5904\u7406\u67d0\u4e2a\u4efb\u52a1\uff0c\u8fd0\u884c\u5b8c\u5c31\u4f1a\u7ec8\u6b62\u3002\u8fd9\u65f6\uff0c\u4f60\u53ef\u80fd\u6839\u672c\u6ca1\u6709\u65f6\u95f4\u6253\u5f00\u8c03\u8bd5\u5de5\u5177\u3002\u7b49\u4f60\u6253\u5f00\u4e86\uff0c\u811a\u672c\u65e9\u5c31\u7ed3\u675f\u8fd0\u884c\u4e86\u3002\u8fd9\u65f6\u600e\u4e48\u8c03\u8bd5\u5462\uff1f\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n$ node --inspect=9229 -e &quot;setTimeout(function() { console.log(&#039;yes&#039;); }, 30000)&quot;\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t\u4e0a\u9762\u4ee3\u7801\u4e2d\uff0c<code>--inspect=9229<\/code>\u6307\u5b9a\u8c03\u8bd5\u7aef\u53e3\u4e3a 9229\uff0c\u8fd9\u662f\u8c03\u8bd5\u5de5\u5177\u9ed8\u8ba4\u7684\u901a\u4fe1\u7aef\u53e3\u3002<code>-e<\/code>\u53c2\u6570\u6307\u5b9a\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u4f5c\u4e3a\u4ee3\u7801\u8fd0\u884c\u3002\n<\/p>\n<p>\n\t\u8bbf\u95ee<code>chrome:\/\/inspect<\/code>\uff0c\u5c31\u53ef\u4ee5\u8fdb\u5165\u8c03\u8bd5\u5de5\u5177\uff0c\u8c03\u8bd5\u8fd9\u6bb5\u4ee3\u7801\u4e86\u3002\n<\/p>\n<p>\n\t<img decoding=\"async\" alt=\"\" src=\"http:\/\/www.ruanyifeng.com\/blogimg\/asset\/2018\/bg2018031913.png\" title=\"\" \/>\n<\/p>\n<p>\n\t\u4ee3\u7801\u653e\u5728<code>setTimeout<\/code>\u91cc\u9762\uff0c\u603b\u662f\u4e0d\u592a\u65b9\u4fbf\u3002\u90a3\u4e9b\u8fd0\u884c\u65f6\u95f4\u8f83\u77ed\u7684\u811a\u672c\uff0c\u53ef\u80fd\u6839\u672c\u6765\u4e0d\u53ca\u6253\u5f00\u8c03\u8bd5\u5de5\u5177\u3002\u8fd9\u65f6\u5c31\u8981\u4f7f\u7528\u4e0b\u9762\u7684\u65b9\u6cd5\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n$ node --inspect-brk=9229 app.js\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t\u4e0a\u9762\u4ee3\u7801\u4e2d\uff0c<code>--inspect-brk<\/code>\u6307\u5b9a\u5728\u7b2c\u4e00\u884c\u5c31\u8bbe\u7f6e\u65ad\u70b9\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u4e00\u5f00\u59cb\u8fd0\u884c\uff0c\u5c31\u662f\u6682\u505c\u7684\u72b6\u6001\u3002\n<\/p>\n<h2>\n\t\u516d\u3001\u5fd8\u4e86\u5199 &#8211;inspect \u600e\u4e48\u529e\uff1f<br \/>\n<\/h2>\n<p>\n\t\u6253\u5f00\u8c03\u8bd5\u5de5\u5177\u7684\u524d\u63d0\u662f\uff0c\u542f\u52a8 Node \u811a\u672c\u65f6\u5c31\u52a0\u4e0a<code>--inspect<\/code>\u53c2\u6570\u3002\u5982\u679c\u5fd8\u4e86\u8fd9\u4e2a\u53c2\u6570\uff0c\u8fd8\u80fd\u4e0d\u80fd\u8c03\u8bd5\u5462\uff1f\n<\/p>\n<p>\n\t\u56de\u7b54\u662f\u53ef\u4ee5\u7684\u3002\u9996\u5148\uff0c\u6b63\u5e38\u542f\u52a8\u811a\u672c\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n$ node app.js\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t\u7136\u540e\uff0c\u5728\u53e6\u4e00\u4e2a\u547d\u4ee4\u884c\u7a97\u53e3\uff0c\u67e5\u627e\u4e0a\u9762\u811a\u672c\u7684\u8fdb\u7a0b\u53f7\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n$ ps ax | grep app.js \r\n\r\n30464 pts\/11   Sl+    0:00 node app.js\r\n30541 pts\/12   S+     0:00 grep app.js\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t\u4e0a\u9762\u547d\u4ee4\u4e2d\uff0c<code>app.js<\/code>\u7684\u8fdb\u7a0b\u53f7\u662f<code>30464<\/code>\u3002\n<\/p>\n<p>\n\t\u63a5\u7740\uff0c\u8fd0\u884c\u4e0b\u9762\u7684\u547d\u4ee4\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n$ node -e &#039;process._debugProcess(30464)&#039;\r\n<\/code><\/pre>\n<\/blockquote>\n<p>\n\t\u4e0a\u9762\u547d\u4ee4\u4f1a\u5efa\u7acb\u8fdb\u7a0b 30464 \u4e0e\u8c03\u8bd5\u5de5\u5177\u7684\u8fde\u63a5\uff0c\u7136\u540e\u5c31\u53ef\u4ee5\u6253\u5f00\u8c03\u8bd5\u5de5\u5177\u4e86\u3002\n<\/p>\n<p>\n\t\u8fd8\u6709\u4e00\u79cd\u65b9\u6cd5\uff0c\u5c31\u662f\u5411\u811a\u672c\u8fdb\u7a0b\u53d1\u9001&nbsp;<a href=\"https:\/\/stackoverflow.com\/questions\/13052548\/node-js-how-to-attach-to-a-running-process-and-to-debug-the-server-with-a-conso\" target=\"_blank\">SIGUSR1<\/a>&nbsp;\u4fe1\u53f7\uff0c\u4e5f\u53ef\u4ee5\u5efa\u7acb\u8c03\u8bd5\u8fde\u63a5\u3002\n<\/p>\n<blockquote>\n<pre>\r\n<code>\r\n$ kill -SIGUSR1 30464\r\n<\/code><\/pre>\n<\/blockquote>\n<h2>\n\t\u4e03\u3001\u53c2\u8003\u94fe\u63a5<br \/>\n<\/h2>\n<ul>\n<li>\n\t\t<a href=\"https:\/\/medium.com\/the-node-js-collection\/debugging-node-js-with-google-chrome-4965b5f910f4\" target=\"_blank\">Debugging Node.js with Google Chrome<\/a>, by Jacopo Daeli\n\t<\/li>\n<li>\n\t\t<a href=\"https:\/\/medium.com\/@paul_irish\/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27\" target=\"_blank\">Debugging Node.js with Chrome DevTools<\/a>, by Paul Irish\n\t<\/li>\n<li>\n\t\t<a href=\"https:\/\/remysharp.com\/2018\/03\/03\/last-minute-node-debugging\" target=\"_blank\">Last minute node debugging<\/a>, by Remy Sharp\n\t<\/li>\n<\/ul>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=2596\">Node \u8c03\u8bd5\u5de5\u5177\u5165\u95e8\u6559\u7a0b<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>JavaScript \u7a0b\u5e8f\u8d8a\u6765\u8d8a\u590d\u6742\uff0c\u8c03\u8bd5\u5de5\u5177\u7684\u91cd\u8981\u6027\u65e5\u76ca\u51f8\u663e\u3002\u5ba2\u6237\u7aef\u811a\u672c\u6709\u6d4f\u89c8\u5668\uff0cNode \u811a\u672c\u600e\u4e48\u8c03\u8bd5\u5462\uff1f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[1054,1415,961,1413,737],"class_list":["post-2596","post","type-post","status-publish","format-standard","hentry","category-html5","tag-node-emoji","tag-node-js","tag-961","tag-1413","tag-737"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2596"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2596\/revisions"}],"predecessor-version":[{"id":2597,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/2596\/revisions\/2597"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}