{"id":10006620,"date":"2022-09-28T13:12:41","date_gmt":"2022-09-28T05:12:41","guid":{"rendered":"https:\/\/ityet.com\/?p=10006620"},"modified":"2022-09-28T13:12:41","modified_gmt":"2022-09-28T05:12:41","slug":"%e5%89%8d%e7%ab%af%e8%ae%be%e8%ae%a1%e8%b5%b0%e6%9f%a5%e5%b9%b3%e5%8f%b0%e5%ae%9e%e8%b7%b5%ef%bc%88%e5%90%8e%e7%ab%af%e7%af%87%ef%bc%89","status":"publish","type":"post","link":"https:\/\/itmax.cn\/?p=10006620","title":{"rendered":"\u524d\u7aef\u8bbe\u8ba1\u8d70\u67e5\u5e73\u53f0\u5b9e\u8df5\uff08\u540e\u7aef\u7bc7\uff09"},"content":{"rendered":"<h2>\u9879\u76ee\u80cc\u666f<\/h2>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042553568\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u968f\u7740\u4e1a\u52a1\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u7814\u53d1\u94fe\u8def\u7684\u6548\u80fd\u63d0\u5347\u4e5f\u662f\u4e00\u4e2a\u81f3\u5173\u91cd\u8981\u7684\u6307\u6807\uff0c\u5176\u4e2d\u5bf9\u524d\u7aef\u5de5\u7a0b\u57fa\u5efa\u800c\u8a00\uff0c\u5176\u4e0a\u6e38\u90e8\u5206\u4e3b\u8981\u662f\u548c\u8bbe\u8ba1\u5e08\u540c\u5b66\u6253\u4ea4\u9053\uff0c\u800c\u5728\u6574\u4e2a\u7814\u53d1\u94fe\u8def\u4e2d\uff0c\u901a\u5e38\u4f1a\u6709\u8bbe\u8ba1\u8d70\u67e5\u7684\u6d41\u7a0b\u6765\u8ba9\u8bbe\u8ba1\u5e08\u540c\u5b66\u8f85\u52a9\u6d4b\u8bd5\u540c\u5b66\u5b8c\u6210UI\u6d4b\u8bd5\u3002\u8bbe\u8ba1\u5e08\u5728\u8fdb\u884c\u8d70\u67e5\u7684\u8fc7\u7a0b\u4e2d\uff0c\u8089\u773c\u7684\u6bd4\u5bf9\u5076\u5c14\u4f1a\u5ffd\u7565\u4e00\u4e9b\u7ec6\u5fae\u90e8\u5206\uff0c\u540c\u65f6\u4e5f\u4f1a\u8017\u8d39\u8bbe\u8ba1\u5e08\u5927\u91cf\u7684\u7cbe\u529b\uff0c\u4e3a\u4e86\u8f85\u52a9\u8bbe\u8ba1\u540c\u5b66\u80fd\u591f\u66f4\u9ad8\u6548\u7684\u8fdb\u884c\u8bbe\u8ba1\u8d70\u67e5\uff0c\u672c\u6587\u65e8\u5728\u901a\u8fc7\u8bbe\u8ba1\u8d70\u67e5\u5e73\u53f0\u5728\u540e\u7aef\u4fa7\u7684\u5b9e\u8df5\u603b\u7ed3\u4e0b\u5bf9\u4e8e\u89c6\u89c9\u7a3f\u8fd8\u539f\u7a0b\u5ea6\u6bd4\u5bf9\u7684\u4e00\u4e9b\u601d\u8def\u3002<\/p>\n<h2>\u65b9\u6848<\/h2>\n<p>\u540e\u7aef\u67b6\u6784\u9009\u578b\uff0c\u5bf9\u4e8e\u524d\u7aef\u57fa\u5efa\u90e8\u5206\u7684\u540e\u7aef\u5e94\u7528\u800c\u8a00\uff0c\u901a\u5e38\u662f\u9009\u62e9node.js\u6765\u8fdb\u884c\u5904\u7406\uff0c\u867d\u7136\u8d70\u67e5\u5e73\u53f0\u540e\u7aef\u6d89\u53ca\u5230\u4e86\u56fe\u7247\u7684\u5bf9\u6bd4\u8ba1\u7b97\uff0c\u4f46\u662f\u5728\u96c6\u56e2\u5c42\u9762\u63d0\u4f9b\u4e86\u5404\u79cd\u4e91\u670d\u52a1\uff0c\u56e0\u800c\u53ef\u4ee5\u5229\u7528\u4e91\u670d\u52a1\u76f8\u5173\u7684\u5404\u79cd\u4e2d\u95f4\u4ef6\u6765\u4fdd\u8bc1\u524d\u7aef\u57fa\u5efa\u540e\u7aef\u670d\u52a1\u7684\u9ad8\u53ef\u7528\u4e0e\u9ad8\u6027\u80fd\u3002\u8bbe\u8ba1\u8d70\u67e5\u5e73\u53f0\u6d89\u53ca\u5230\u4e86\u56fe\u7247\u4e0a\u4f20\u540e\u7684\u4e34\u65f6\u5b58\u50a8\uff0c\u5982\u679c\u4f7f\u7528\u4e91\u5b58\u50a8\uff0c\u6bd4\u5982\uff1a\u5bf9\u8c61\u5b58\u50a8\u7b49\uff0c\u52bf\u5fc5\u6d89\u53ca\u5230\u5927\u91cf\u7684\u4e0e\u4e91\u5e73\u53f0\u7684\u4ea4\u4e92\uff0c\u8f83\u4e3a\u7e41\u7410\uff0c\u800c\u672c\u5e94\u7528\u4e1a\u52a1\u4e3b\u8981\u662f\u7528\u4e8e\u5904\u7406\u4e24\u5f20\u56fe\u7247\u7684\u6bd4\u5bf9\uff0c\u8ba1\u7b97\u8981\u6c42\u8981\u9ad8\u4e8e\u5b58\u50a8\u8981\u6c42\uff0c\u56e0\u800c\u9009\u62e9\u4e34\u65f6\u6587\u4ef6\u5b58\u50a8\u5728\u672c\u5730\u7cfb\u7edf\u4e2d\uff0c\u4f46\u8fd9\u5c31\u5e26\u6765\u4e86\u4e00\u4e2a\u95ee\u9898\uff0c\u90a3\u5c31\u662f\u5927\u91cf\u5bf9\u6bd4\u9700\u6c42\u53ef\u80fd\u4f1a\u5c06\u670d\u52a1\u641e\u5d29\uff0c\u8003\u8651\u5230node.js\u670d\u52a1\u7684\u591a\u8fdb\u7a0b\u5355\u7ebf\u7a0b\u7684\u7279\u6027\uff0c\u6211\u4eec\u8fd9\u91cc\u5f15\u5165\u4e86pm2\u6765\u8fdb\u884c\u8fdb\u7a0b\u7ba1\u7406\uff0c\u540c\u65f6\u4f7f\u7528\u5b9a\u65f6\u4efb\u52a1cron\u5bf9\u4e34\u65f6\u6587\u4ef6\u8fdb\u884c\u5b9a\u65f6\u6e05\u7406(ps\uff1a\u8fd9\u91cc\u4e5f\u53ef\u4ee5\u5229\u7528k8s\u7684\u5b9a\u65f6\u4efb\u52a1\u8fdb\u884c\u5904\u7406)\uff0c\u4fdd\u8bc1\u4e1a\u52a1\u7684\u53ef\u7528\u6027\u3002<\/p>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042553569\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<h2>\u76ee\u5f55<\/h2>\n<ul>\n<li>\n<p>db<\/p>\n<ul>\n<li><em>temp<\/em><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>server<\/p>\n<ul>\n<li>\n<p>routes<\/p>\n<ul>\n<li>\n<p>piper<\/p>\n<ul>\n<li>compare<\/li>\n<li>upload<\/li>\n<li>index.js<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>app.js<\/li>\n<\/ul>\n<\/li>\n<li>ecosystem.config.js<\/li>\n<\/ul>\n<h2>\u5b9e\u8df5<\/h2>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042553570\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u5bf9\u56fe\u7247\u6bd4\u5bf9\u90e8\u5206\uff0c\u8fd9\u91cc\u4f7f\u7528 <code>looks-same<\/code> \u5e93\u6765\u8fdb\u884cpng\u56fe\u7247\u7684\u6bd4\u5bf9\uff0c\u5176\u672c\u8d28\u662f\u901a\u8fc7(x,y)\u50cf\u7d20\u7684\u5dee\u5f02\u6bd4\u5bf9\u8fdb\u884cpixel\u56fe\u7247\u7684\u8986\u76d6\u63cf\u7ed8\uff0c\u6700\u540e\u8f93\u51fa\u4e00\u4e2a\u5bf9\u6bd4\u53e0\u52a0\u7684\u56fe\u7247\uff0c\u5176\u4ed6\u7684\u5e93\u8fd8\u6709 <code>pixel-match<\/code> \u4ee5\u53ca <code>image-diff<\/code> \u7b49\u90fd\u53ef\u4ee5\u6765\u8fdb\u884c\u56fe\u7247\u7684\u6bd4\u5bf9<\/p>\n<h2>\u6e90\u7801<\/h2>\n<h3>piper<\/h3>\n<h4>upload<\/h4>\n<p>\u7528\u4e8e\u56fe\u7247\u7684\u4e0a\u4f20\uff0c\u4f7f\u7528 <code>multer<\/code> \u5c06 <code>multipart\/form-data<\/code> \u8fdb\u884c\u8f6c\u6362<\/p>\n<pre><code class=\"javascript\">const router = require('..\/..\/router');\nconst multer = require('multer');\nconst path = require('path');\nconst fs = require('fs');\n\nconst storage = multer.diskStorage({\n  destination: function(req, file, cb) {\n    if(file.mimetype == 'image\/png') {\n      cb(null, path.resolve(__dirname, '..\/..\/..\/..\/db\/__temp__'))\n    } else {\n      cb({ error: 'Mime type not supported' })\n    }\n    \n  },\n  filename: function(req, file, cb) {\n    cb(null, `${Date.now()}.${file.originalname}`)\n  }\n})\n\n\/**\n * @openapi\n * \/piper\/upload\/putImage:\n    post:\n      summary: \u4e0a\u4f20\u56fe\u7247\n      tags: \n        - putImage\n      requestBody:\n        required: true\n        content: \n          application\/json: \n            schema: \n              $ref: '#\/components\/schemas\/putImage'\n      responses:  \n        '200':\n          content:\n            application\/json:\n              example:\n                code: &quot;0&quot;\n                data: &quot;&quot;\n                msg: &quot;\u6210\u529f&quot;\n                success: true\n *\/\nrouter.post('\/putImage', multer({\n    storage: storage\n}).single('img'), async function (req, res) {\n  console.log('putImage', req.file);\n    \/\/ \u5b9a\u65f6\u5220\u9664\u4e0a\u4f20\u7684\u56fe\u7247\n    \n    setTimeout(() =&gt; {\n      if(fs.existsSync(path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${req.file.filename}`))) {\n        fs.unlink(path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${req.file.filename}`), function (err) {\n          if (err) {\n            console.error(`\u5220\u9664\u6587\u4ef6 ${req.file.filename} \u5931\u8d25\uff0c\u5931\u8d25\u539f\u56e0\uff1a${err}`)\n          }\n          console.log(`\u5220\u9664\u6587\u4ef6 ${req.file.filename} \u6210\u529f`)\n        });\n      } else {\n        console.log(`\u6587\u4ef6 ${req.file.filename} \u4e0d\u5b58\u5728`)\n      }\n    }, 120 * 1000)\n    return res.json({\n        code: &quot;0&quot;,\n        data: {\n          filename: req.file.filename,\n          size: req.file.size\n        },\n        msg: '\u6210\u529f',\n        success: true\n    })\n});\n\nmodule.exports = router;<\/code><\/pre>\n<h4>compare<\/h4>\n<p>\u4f7f\u7528 <code>looks-same<\/code> \u5bf9\u56fe\u7247\u8fdb\u884c\u6bd4\u5bf9\uff0c\u70b9\u51fb\u4e0b\u8f7d\u540e\u53ef\u4ee5\u83b7\u53d6\u5bf9\u6bd4\u7684\u56fe\u7247<\/p>\n<pre><code class=\"javascript\">const router = require('..\/..\/router');\nconst looksSame = require('looks-same');\nconst path = require('path');\nconst fs = require('fs');\n\n\/**\n * @openapi\n * \/piper\/compare\/compareImage:\n    post:\n      summary: \u6bd4\u8f83\u56fe\u7247\n      tags: \n        - compareImage\n      requestBody:\n        required: true\n        content: \n          application\/json: \n            schema: \n              $ref: '#\/components\/schemas\/compareImage'\n      responses:  \n        '200':\n          content:\n            application\/json:\n              example:\n                code: &quot;0&quot;\n                data: &quot;&quot;\n                msg: &quot;\u6210\u529f&quot;\n                success: true\n *\/\nrouter.post('\/compareImage', function (req, res) {\n  console.log('compareImage', req.body);\n  const {\n    designName,\n    codeName\n  } = req.body;\n  if (designName &amp;&amp; codeName) {\n    if (fs.existsSync(path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${designName}`)) &amp;&amp; fs.existsSync(path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${codeName}`))) {\n      const [, ...d] = designName.split('.'),\n        [, ...c] = codeName.split('.');\n      d.pop();\n      c.pop();\n      const dName = d.join(''),\n        cName = c.join('');\n      const compareName = `${Date.now()}.${dName}.${cName}.png`;\n      looksSame.createDiff({\n        reference: path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${designName}`),\n        current: path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${codeName}`),\n        diff: path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${compareName}`),\n        highlightColor: '#ff00ff', \/\/ color to highlight the differences\n        strict: false, \/\/ strict comparsion\n        tolerance: 2.5,\n        antialiasingTolerance: 0,\n        ignoreAntialiasing: true, \/\/ ignore antialising by default\n        ignoreCaret: true \/\/ ignore caret by default\n      }, function (error) {\n        if (error) {\n          return res.json({\n            code: &quot;-1&quot;,\n            data: error,\n            msg: '\u5931\u8d25',\n            success: false\n          })\n        } else {\n          [codeName, designName].forEach(item =&gt; {\n            fs.unlink(path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${item}`), function (err) {\n              if (err) {\n                console.error(`\u5220\u9664\u6587\u4ef6 ${item} \u5931\u8d25\uff0c\u5931\u8d25\u539f\u56e0\uff1a${err}`)\n              }\n              console.log(`\u5220\u9664\u6587\u4ef6 ${item} \u6210\u529f`)\n            });\n          })\n          return res.json({\n            code: &quot;0&quot;,\n            data: {\n              compareName: compareName\n            },\n            msg: '\u6210\u529f',\n            success: true\n          })\n        }\n      });\n    } else {\n      return res.json({\n        code: &quot;-1&quot;,\n        data: '\u6240\u9700\u5bf9\u6bd4\u56fe\u7247\u4e0d\u5b58\u5728\uff0c\u8bf7\u91cd\u65b0\u786e\u8ba4',\n        msg: '\u5931\u8d25',\n        success: false\n      })\n    }\n  } else {\n    return res.json({\n      code: &quot;-1&quot;,\n      data: '\u6240\u9700\u5bf9\u6bd4\u56fe\u7247\u65e0\u6cd5\u627e\u5230\uff0c\u8bf7\u91cd\u65b0\u786e\u8ba4',\n      msg: '\u5931\u8d25',\n      success: false\n    })\n  }\n});\n\n\/**\n * @openapi\n * \/piper\/compare\/downloadImage:\n    post:\n      summary: \u4e0b\u8f7d\u6bd4\u8f83\u56fe\u7247\n      tags: \n        - downloadImage\n      requestBody:\n        required: true\n        content: \n          application\/json: \n            schema: \n              $ref: '#\/components\/schemas\/downloadImage'\n      responses:  \n        '200':\n          content:\n            application\/json:\n              example:\n                code: &quot;0&quot;\n                data: &quot;&quot;\n                msg: &quot;\u6210\u529f&quot;\n                success: true\n *\/\nrouter.post('\/downloadImage', function (req, res) {\n  console.log('downloadImage', req.body);\n  const {\n    compareName\n  } = req.body;\n  if (compareName) {\n    const f = fs.createReadStream(path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${compareName}`));\n    res.writeHead(200, {\n      'Content-Type': 'application\/force-download',\n      'Content-Disposition': 'attachment; filename=' + compareName\n    });   \n    f.on('data', (data) =&gt; {\n      res.write(data);\n    }).on('end', () =&gt; {\n      res.end();\n      fs.unlink(path.resolve(__dirname, `..\/..\/..\/..\/db\/__temp__\/${compareName}`), function (err) {\n        if (err) {\n          console.error(`\u5220\u9664\u6587\u4ef6 ${compareName} \u5931\u8d25\uff0c\u5931\u8d25\u539f\u56e0\uff1a${err}`)\n        }\n        console.log(`\u5220\u9664\u6587\u4ef6 ${compareName} \u6210\u529f`)\n      });\n    })\n  } else {\n    return res.json({\n      code: &quot;-1&quot;,\n      data: '\u751f\u6210\u5bf9\u6bd4\u56fe\u7247\u540d\u79f0\u4e0d\u6b63\u786e\uff0c\u8bf7\u91cd\u65b0\u786e\u8ba4',\n      msg: '\u5931\u8d25',\n      success: false\n    })\n  }\n});\n\nmodule.exports = router;<\/code><\/pre>\n<h3>app.js<\/h3>\n<p>\u5b9a\u65f6\u4efb\u52a1\uff0c\u6bcf\u592923\u70b959\u5206\u5b9a\u65f6\u6e05\u7406\u4e34\u65f6\u6587\u4ef6<\/p>\n<pre><code class=\"javascript\">\/\/ \u6bcf\u592923\u70b959\u5206\u5220\u9664\u4e34\u65f6\u6587\u4ef6\ncron.schedule(&quot;59 23 * * *&quot;, function() {\n    console.log(&quot;---------------------&quot;);\n    console.log(&quot;Cron Job Start&quot;);\n    const files = fs.readdirSync(path.resolve(__dirname, '..\/db\/__temp__'));\n    if(files.length &gt; 0) {\n        files.forEach(file =&gt; fs.unlinkSync(path.resolve(__dirname, `..\/db\/__temp__\/${file}`)));\n    }\n    console.log(&quot;Cron Job Done&quot;);\n    console.log(&quot;---------------------&quot;);\n});<\/code><\/pre>\n<h3>ecosystem.config.js<\/h3>\n<p><code>pm2<\/code> \u76f8\u5173\u7684\u4e00\u4e9b\u914d\u7f6e\uff0c\u8fd9\u91cc\u5f00\u542f\u4e863\u4e2a\u5b9e\u4f8b\u8fdb\u884c\u76d1\u542c<\/p>\n<pre><code class=\"javascript\">module.exports = {\n    apps: [\n        {\n            name: 'server',\n            script: '.\/server',\n            exec_mode: 'cluster',\n            instances: 3,\n            max_restarts: 4,\n            min_uptime: 5000,\n            max_memory_restart: '1G'\n        }\n    ]\n}<\/code><\/pre>\n<h2>\u603b\u7ed3<\/h2>\n<p><img decoding=\"async\" referrerpolicy=\"no-referrer\" src=\"https:\/\/segmentfault.com\/img\/remote\/1460000042553571\" alt=\"\" title=\"\" loading=\"lazy\"><\/p>\n<p>\u524d\u7aef\u8bbe\u8ba1\u8d70\u67e5\u5e73\u53f0\u7684\u540e\u7aef\u63a5\u53e3\u90e8\u5206\u6838\u5fc3\u5728\u4e8e\u56fe\u7247\u7684\u6bd4\u5bf9\uff0c\u800c\u5bf9\u4e8e\u56fe\u7247\u76f8\u4f3c\u5ea6\u7684\u6bd4\u8f83\uff0c\u901a\u5e38\u53c8\u4f1a\u6d89\u53ca\u5230\u56fe\u50cf\u5904\u7406\u76f8\u5173\u7684\u5185\u5bb9\uff0c\u8fd9\u91cc\u4f7f\u7528\u7684\u662f <code>looks-same<\/code> \u8fd9\u4e2a\u5f00\u6e90\u5e93\uff0c\u5176\u672c\u8d28\u5229\u7528\u50cf\u7d20\u4e4b\u95f4\u7684\u5339\u914d\u6765\u8ba1\u7b97\u76f8\u4f3c\u5ea6\uff0c\u53e6\u5916\u8fd8\u6709\u5229\u7528\u4f59\u5f26\u76f8\u4f3c\u5ea6\u3001\u54c8\u5e0c\u7b97\u6cd5\u3001\u76f4\u65b9\u56fe\u3001SSIM\u3001\u4e92\u4fe1\u606f\u7b49\uff0c\u9664\u4e86\u8fd9\u4e9b\u4f20\u7edf\u65b9\u6cd5\u5916\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6df1\u5ea6\u5b66\u4e60\u7684\u65b9\u6cd5\u6765\u5904\u7406\uff0c\u5e38\u89c1\u7684\u6709\u5982\u7279\u5f81\u503c\u63d0\u53d6+\u7279\u5f81\u5411\u91cf\u76f8\u4f3c\u5ea6\u8ba1\u7b97\u7684\u65b9\u6cd5\u7b49\u7b49\uff0c\u8fd9\u5c31\u6d89\u53ca\u5230\u4e86\u524d\u7aef\u667a\u80fd\u5316\u7684\u9886\u57df\uff0c\u5bf9\u4e8e\u8fd9\u90e8\u5206\u611f\u5174\u8da3\u7684\u540c\u5b66\u53ef\u4ee5\u53c2\u770b\u4e00\u4e0b\u8682\u8681\u91d1\u670d\u7684\u8499\u5a1c\u4e3d\u838e\u8fd9\u4e2a\u667a\u80fd\u5316\u7684\u8bbe\u8ba1\u8d70\u67e5\u5e73\u53f0\u7684\u5b9e\u73b0(ps\uff1a<a href=\"https:\/\/www.bilibili.com\/video\/BV19r4y1x786\/\">\u66f4\u667a\u80fd\u7684\u89c6\u89c9\u9a8c\u6536\u63d0\u6548\u65b9\u6848 &#8211; \u7533\u59dc<\/a>)\u3002\u5728\u524d\u7aef\u667a\u80fd\u5316\u9886\u57df\u4e2d\uff0c\u901a\u5e38\u5e94\u7528\u573a\u666f\u90fd\u662f\u4e0e\u4e0a\u6e38\u8bbe\u8ba1\u90e8\u5206\u7684\u843d\u5730\u4e2d\uff0c\u6bd4\u5982D2C\u548cC2D\u9886\u57df\uff0c\u5bf9\u4e8e\u524d\u7aef\u667a\u80fd\u5316\u65b9\u5411\u611f\u5174\u8da3\u7684\u540c\u5b66\uff0c\u53ef\u4ee5\u7740\u91cd\u5728\u8fd9\u4e2a\u89d2\u5ea6\u591a\u591a\u7814\u8ba8\uff0c\u5171\u52c9\uff01\uff01\uff01<\/p>\n<h2>\u53c2\u8003<\/h2>\n<ul>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=uF02bf0q%2FTcV3itTvcupLQ%3D%3D.3cUszRBXzLV9riNlQYXhkxI0n%2BOpeUVjFX1EuKgq9MUJMU0cKvx%2BwF%2F322%2Fhanx2\" rel=\"nofollow\">\u4f60\u77e5\u9053pm2\u662f\u600e\u4e48\u5de5\u4f5c\u7684\u5417<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=cD%2BkHcjHB6U90igFfX5yfQ%3D%3D.ZVsKOYKtwvJR5TZJJQenllcK3RsoKiRMCsJC1Mse0fjJuQThbmGKY1bVd5yf8Jog\" rel=\"nofollow\">Node\u7684Cluster\u6a21\u5757\u548cPM2 \u7684\u539f\u7406\u4ecb\u7ecd<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=mo9vgEUqLjL1hObbHcyR8w%3D%3D.7fQqCj38%2FASWEdW0Wtbobqf%2Fihfbaf2Onw32cZk2wcId5UYBQWzozvN8o6BB0%2Fyf\" rel=\"nofollow\">Linux \u60ca\u7fa4\u6548\u5e94\u4e4b Nginx \u89e3\u51b3\u65b9\u6848<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=Tyuc5OH6jtZUlBYLsAWIaA%3D%3D.rzErR27%2FOmXEfVYp1EHCx0Riy7qLEwdgBzN57aaGbEGtN%2BlfXZc79x9DYBtOk82xatJWDJkhSz3a0TfU%2F51tVg%3D%3D\" rel=\"nofollow\">\u8bbe\u8ba1\u5c0f\u59d0\u59d0\u90fd\u8bf4\u597d\u7684\u89c6\u89c9\u8fd8\u539f\u5bf9\u6bd4\u5229\u5668<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=s07A1TNZdyw9JLESHAWv5g%3D%3D.ULONvHlkxsmTD7Hn4%2BBMaECGylAdhD%2Fdt6IQV5RQkvfGX7wwX1SBuz4mo3IbR5TYkuE7meC7KkNCfdKSir7peQ%3D%3D\" rel=\"nofollow\">\u91cd\u70b9\uff1a\u673a\u5668\u5b66\u4e60\u603b\u7ed3\u4e4b\u5404\u7b97\u6cd5\u5e38\u7528\u5305\u548c\u51fd\u6570<\/a><\/li>\n<li><a href=\"https:\/\/link.segmentfault.com\/?enc=hpezOU4spthtyUcHzXftTw%3D%3D.%2FM%2Bme7LHRSgTYBvY%2FzIDuEmmolcMRQTpAdZovVN8v4zjssV8SK1nGUIvjIdFAn8n\" rel=\"nofollow\">\u56fe\u7247\u76f8\u4f3c\u5ea6\u8ba1\u7b97\u65b9\u6cd5\u603b\u7ed3<\/a><\/li>\n<\/ul>\n<p><a href=\"https:\/\/segmentfault.com\/a\/1190000042553566\">https:\/\/segmentfault.com\/a\/1190000042553566<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9879\u76ee\u80cc\u666f \u968f\u7740\u4e1a\u52a1\u7684\u4e0d\u65ad\u53d1\u5c55\uff0c\u7814\u53d1\u94fe\u8def\u7684\u6548\u80fd\u63d0\u5347\u4e5f\u662f\u4e00\u4e2a\u81f3\u5173\u91cd\u8981\u7684\u6307\u6807\uff0c\u5176\u4e2d\u5bf9\u524d\u7aef\u5de5\u7a0b\u57fa\u5efa\u800c\u8a00\uff0c\u5176\u4e0a\u6e38\u90e8\u5206\u4e3b\u8981 [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[],"tags":[],"class_list":["post-10006620","post","type-post","status-publish","format-standard","hentry"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10006620"}],"version-history":[{"count":0,"href":"https:\/\/itmax.cn\/index.php?rest_route=\/wp\/v2\/posts\/10006620\/revisions"}],"wp:attachment":[{"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10006620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10006620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itmax.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10006620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}