{"id":24569,"date":"2024-11-21T11:51:53","date_gmt":"2024-11-21T03:51:53","guid":{"rendered":"https:\/\/fwq.ai\/blog\/24569\/"},"modified":"2024-11-21T11:51:53","modified_gmt":"2024-11-21T03:51:53","slug":"webman%e6%8a%80%e6%9c%af%e5%9c%a8%e7%a4%be%e5%8c%ba%e6%9c%8d%e5%8a%a1%e5%b9%b3%e5%8f%b0%e4%b8%ad%e7%9a%84%e5%88%9b%e6%96%b0%e5%ba%94%e7%94%a8","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/24569\/","title":{"rendered":"WebMan\u6280\u672f\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\u7684\u521b\u65b0\u5e94\u7528"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/000\/465\/014\/169309586361879.jpg\" class=\"aligncenter\" title=\"WebMan\u6280\u672f\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\u7684\u521b\u65b0\u5e94\u7528\u63d2\u56fe\" alt=\"WebMan\u6280\u672f\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\u7684\u521b\u65b0\u5e94\u7528\u63d2\u56fe\" \/><\/p>\n<p>WebMan\u6280\u672f\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\u7684\u521b\u65b0\u5e94\u7528<\/p>\n<p>WebMan\u6280\u672f\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\u7684\u521b\u65b0\u5e94\u7528\u662f\u73b0\u4ee3\u793e\u533a\u670d\u52a1\u7684\u8d8b\u52bf\u4e4b\u4e00\u3002\u968f\u7740\u6570\u5b57\u5316\u65f6\u4ee3\u7684\u5230\u6765\uff0c\u4eba\u4eec\u5bf9\u793e\u533a\u670d\u52a1\u7684\u9700\u6c42\u4e5f\u9010\u6e10\u589e\u52a0\u3002\u4f20\u7edf\u7684\u793e\u533a\u670d\u52a1\u65b9\u5f0f\u96be\u4ee5\u6ee1\u8db3\u4eba\u4eec\u7684\u9700\u6c42\uff0c\u9700\u8981\u501f\u52a9\u65b0\u5174\u7684\u6280\u672f\u624b\u6bb5\u6765\u63d0\u5347\u793e\u533a\u670d\u52a1\u7684\u6548\u7387\u548c\u8d28\u91cf\u3002\u800cWebMan\u6280\u672f\u4fbf\u662f\u5176\u4e2d\u7684\u4e00\u9879\u91cd\u8981\u6280\u672f\u3002<\/p>\n<p>WebMan\u6280\u672f\u662f\u4e00\u79cd\u57fa\u4e8e\u7f51\u7edc\u7684\u7ba1\u7406\u6280\u672f\uff0c\u5b83\u4e3b\u8981\u7531\u524d\u7aef\u7f51\u9875\u5f00\u53d1\u548c\u540e\u7aef\u670d\u52a1\u5668\u5f00\u53d1\u7ec4\u6210\u3002\u524d\u7aef\u7f51\u9875\u5f00\u53d1\u7528\u4e8e\u6784\u5efa\u7528\u6237\u754c\u9762\uff0c\u540e\u7aef\u670d\u52a1\u5668\u5f00\u53d1\u5219\u8d1f\u8d23\u5904\u7406\u7528\u6237\u8bf7\u6c42\u548c\u6570\u636e\u7ba1\u7406\u3002WebMan\u6280\u672f\u80fd\u591f\u5b9e\u73b0\u4e0e\u7528\u6237\u4e92\u52a8\u7684\u529f\u80fd\uff0c\u540c\u65f6\u4e5f\u80fd\u591f\u5904\u7406\u5927\u91cf\u7684\u6570\u636e\u548c\u4fe1\u606f\u3002<\/p>\n<p>\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\uff0cWebMan\u6280\u672f\u53ef\u4ee5\u5e94\u7528\u4e8e\u5404\u4e2a\u65b9\u9762\u3002\u4e0b\u9762\u4ee5\u4e00\u4e2a\u793e\u533a\u6d3b\u52a8\u7ba1\u7406\u7cfb\u7edf\u4e3a\u4f8b\uff0c\u6765\u5c55\u793aWebMan\u6280\u672f\u7684\u521b\u65b0\u5e94\u7528\u3002<\/p>\n<p>\u9996\u5148\uff0c\u793e\u533a\u6d3b\u52a8\u7ba1\u7406\u7cfb\u7edf\u9700\u8981\u5177\u5907\u7528\u6237\u6ce8\u518c\u3001\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\u7684\u529f\u80fd\u3002\u901a\u8fc7\u4f7f\u7528WebMan\u6280\u672f\uff0c\u53ef\u4ee5\u8f7b\u677e\u6784\u5efa\u7528\u6237\u754c\u9762\uff0c\u5e76\u901a\u8fc7\u540e\u7aef\u670d\u52a1\u5668\u8fdb\u884c\u7528\u6237\u8eab\u4efd\u9a8c\u8bc1\u548c\u6743\u9650\u7ba1\u7406\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4ee3\u7801\u793a\u4f8b\uff1a<\/p>\n<pre>\/\/ \u524d\u7aef\u7f51\u9875\u5f00\u53d1\n\n\n&lt;title&gt;\u7528\u6237\u767b\u5f55&lt;\/title&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u7528\u6237\u540d:  <\/p>\n<p> \u5bc6\u7801:  <\/p>\n<p>   \/\/ \u540e\u7aef\u670d\u52a1\u5668\u5f00\u53d1 const express = require(&#8216;express&#8217;); const app = express(); app.post(&#8216;\/login&#8217;, (req, res) =&gt; { const username = req.body.username; const password = req.body.password; \/\/ \u4f7f\u7528\u6570\u636e\u5e93\u67e5\u8be2\u7528\u6237\u4fe1\u606f\u5e76\u9a8c\u8bc1\u7528\u6237\u540d\u548c\u5bc6\u7801 \/\/ \u9a8c\u8bc1\u901a\u8fc7\uff0c\u8fd4\u56de\u7528\u6237\u6743\u9650 \/\/ \u9a8c\u8bc1\u5931\u8d25\uff0c\u8fd4\u56de\u9519\u8bef\u4fe1\u606f }); app.listen(3000, () =&gt; { console.log(&#8216;\u670d\u52a1\u5668\u5df2\u542f\u52a8&#8217;); }); <\/p>\n<p>\u5176\u6b21\uff0c\u793e\u533a\u6d3b\u52a8\u7ba1\u7406\u7cfb\u7edf\u9700\u8981\u5177\u5907\u6d3b\u52a8\u53d1\u5e03\u548c\u53c2\u4e0e\u7684\u529f\u80fd\u3002\u901a\u8fc7\u4f7f\u7528WebMan\u6280\u672f\uff0c\u53ef\u4ee5\u5b9e\u73b0\u6d3b\u52a8\u4fe1\u606f\u7684\u53d1\u5e03\u548c\u7528\u6237\u7684\u62a5\u540d\u529f\u80fd\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4ee3\u7801\u793a\u4f8b\uff1a<\/p>\n<pre>\/\/ \u524d\u7aef\u7f51\u9875\u5f00\u53d1\n\n\n&lt;title&gt;\u6d3b\u52a8\u53d1\u5e03&lt;\/title&gt;<\/pre>\n<p>  \u767b\u5f55\u540e\u590d\u5236    \u6d3b\u52a8\u6807\u9898:  <\/p>\n<p> \u6d3b\u52a8\u5185\u5bb9:  <\/p>\n<p>   \/\/ \u540e\u7aef\u670d\u52a1\u5668\u5f00\u53d1 app.post(&#8216;\/activity&#8217;, (req, res) =&gt; { const title = req.body.title; const content = req.body.content; \/\/ \u5c06\u6d3b\u52a8\u4fe1\u606f\u5b58\u50a8\u5230\u6570\u636e\u5e93 \/\/ \u8fd4\u56de\u6210\u529f\u4fe1\u606f }); <\/p>\n<p>\u901a\u8fc7WebMan\u6280\u672f\u7684\u521b\u65b0\u5e94\u7528\uff0c\u793e\u533a\u670d\u52a1\u5e73\u53f0\u53ef\u4ee5\u5b9e\u73b0\u66f4\u9ad8\u6548\u3001\u66f4\u4fbf\u6377\u7684\u670d\u52a1\uff0c\u63d0\u5347\u793e\u533a\u5c45\u6c11\u7684\u751f\u6d3b\u8d28\u91cf\u3002\u540c\u65f6\uff0cWebMan\u6280\u672f\u4e5f\u4e3a\u793e\u533a\u670d\u52a1\u63d0\u4f9b\u4e86\u66f4\u591a\u521b\u65b0\u7684\u53ef\u80fd\u6027\uff0c\u4f8b\u5982\u793e\u533a\u8bba\u575b\u3001\u5728\u7ebf\u6295\u8bc9\u5efa\u8bae\u7b49\u529f\u80fd\u7684\u5b9e\u73b0\u3002<\/p>\n<p>\u603b\u4e4b\uff0cWebMan\u6280\u672f\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\u7684\u521b\u65b0\u5e94\u7528\u4e3a\u793e\u533a\u670d\u52a1\u5e26\u6765\u4e86\u65b0\u7684\u673a\u9047\u548c\u6311\u6218\u3002\u968f\u7740\u6280\u672f\u7684\u4e0d\u65ad\u8fdb\u6b65\u548c\u53d1\u5c55\uff0c\u6211\u4eec\u53ef\u4ee5\u671f\u5f85\u793e\u533a\u670d\u52a1\u5728\u6570\u5b57\u5316\u65f6\u4ee3\u5f97\u5230\u66f4\u597d\u7684\u53d1\u5c55\u548c\u63d0\u5347\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662fWebMan\u6280\u672f\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\u7684\u521b\u65b0\u5e94\u7528\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>WebMan\u6280\u672f\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\u7684\u521b\u65b0\u5e94\u7528 WebMan\u6280\u672f\u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\u7684\u521b\u65b0\u5e94\u7528\u662f\u73b0\u4ee3\u793e\u533a\u670d\u52a1\u7684\u8d8b\u52bf\u4e4b\u4e00\u3002\u968f\u7740\u6570\u5b57\u5316\u65f6\u4ee3\u7684\u5230\u6765\uff0c\u4eba\u4eec\u5bf9\u793e\u533a\u670d\u52a1\u7684\u9700\u6c42\u4e5f\u9010\u6e10\u589e\u52a0\u3002\u4f20\u7edf\u7684\u793e\u533a\u670d\u52a1\u65b9\u5f0f\u96be\u4ee5\u6ee1\u8db3\u4eba\u4eec\u7684\u9700\u6c42\uff0c\u9700\u8981\u501f\u52a9\u65b0\u5174\u7684\u6280\u672f\u624b\u6bb5\u6765\u63d0\u5347\u793e\u533a\u670d\u52a1\u7684\u6548\u7387\u548c\u8d28\u91cf\u3002\u800cWebMan\u6280\u672f\u4fbf\u662f\u5176\u4e2d\u7684\u4e00\u9879\u91cd\u8981\u6280\u672f\u3002 WebMan\u6280\u672f\u662f\u4e00\u79cd\u57fa\u4e8e\u7f51\u7edc\u7684\u7ba1\u7406\u6280\u672f\uff0c\u5b83\u4e3b\u8981\u7531\u524d\u7aef\u7f51\u9875\u5f00\u53d1\u548c\u540e\u7aef\u670d\u52a1\u5668\u5f00\u53d1\u7ec4\u6210\u3002\u524d\u7aef\u7f51\u9875\u5f00\u53d1\u7528\u4e8e\u6784\u5efa\u7528\u6237\u754c\u9762\uff0c\u540e\u7aef\u670d\u52a1\u5668\u5f00\u53d1\u5219\u8d1f\u8d23\u5904\u7406\u7528\u6237\u8bf7\u6c42\u548c\u6570\u636e\u7ba1\u7406\u3002WebMan\u6280\u672f\u80fd\u591f\u5b9e\u73b0\u4e0e\u7528\u6237\u4e92\u52a8\u7684\u529f\u80fd\uff0c\u540c\u65f6\u4e5f\u80fd\u591f\u5904\u7406\u5927\u91cf\u7684\u6570\u636e\u548c\u4fe1\u606f\u3002 \u5728\u793e\u533a\u670d\u52a1\u5e73\u53f0\u4e2d\uff0cWebMan\u6280\u672f\u53ef\u4ee5\u5e94\u7528\u4e8e\u5404\u4e2a\u65b9\u9762\u3002\u4e0b\u9762\u4ee5\u4e00\u4e2a\u793e\u533a\u6d3b\u52a8\u7ba1\u7406\u7cfb\u7edf\u4e3a\u4f8b\uff0c\u6765\u5c55\u793aWebMan\u6280\u672f\u7684\u521b\u65b0\u5e94\u7528\u3002 \u9996\u5148\uff0c\u793e\u533a\u6d3b\u52a8\u7ba1\u7406\u7cfb\u7edf\u9700\u8981\u5177\u5907\u7528\u6237\u6ce8\u518c\u3001\u767b\u5f55\u548c\u6743\u9650\u63a7\u5236\u7684\u529f\u80fd\u3002\u901a\u8fc7\u4f7f\u7528WebMan\u6280\u672f\uff0c\u53ef\u4ee5\u8f7b\u677e\u6784\u5efa\u7528\u6237\u754c\u9762\uff0c\u5e76\u901a\u8fc7\u540e\u7aef\u670d\u52a1\u5668\u8fdb\u884c\u7528\u6237\u8eab\u4efd\u9a8c\u8bc1\u548c\u6743\u9650\u7ba1\u7406\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4ee3\u7801\u793a\u4f8b\uff1a \/\/ \u524d\u7aef\u7f51\u9875\u5f00\u53d1 &lt;title&gt;\u7528\u6237\u767b\u5f55&lt;\/title&gt; \u767b\u5f55\u540e\u590d\u5236 \u7528\u6237\u540d: \u5bc6\u7801: \/\/ \u540e\u7aef\u670d\u52a1\u5668\u5f00\u53d1 const express = require(&#8216;express&#8217;); const app = express(); app.post(&#8216;\/login&#8217;, (req, res) =&gt; { const username = req.body.username; const password = req.body.password; \/\/ \u4f7f\u7528\u6570\u636e\u5e93\u67e5\u8be2\u7528\u6237\u4fe1\u606f\u5e76\u9a8c\u8bc1\u7528\u6237\u540d\u548c\u5bc6\u7801 \/\/ \u9a8c\u8bc1\u901a\u8fc7\uff0c\u8fd4\u56de\u7528\u6237\u6743\u9650 \/\/ \u9a8c\u8bc1\u5931\u8d25\uff0c\u8fd4\u56de\u9519\u8bef\u4fe1\u606f }); app.listen(3000, () =&gt; { console.log(&#8216;\u670d\u52a1\u5668\u5df2\u542f\u52a8&#8217;); }); \u5176\u6b21\uff0c\u793e\u533a\u6d3b\u52a8\u7ba1\u7406\u7cfb\u7edf\u9700\u8981\u5177\u5907\u6d3b\u52a8\u53d1\u5e03\u548c\u53c2\u4e0e\u7684\u529f\u80fd\u3002\u901a\u8fc7\u4f7f\u7528WebMan\u6280\u672f\uff0c\u53ef\u4ee5\u5b9e\u73b0\u6d3b\u52a8\u4fe1\u606f\u7684\u53d1\u5e03\u548c\u7528\u6237\u7684\u62a5\u540d\u529f\u80fd\u3002\u4e0b\u9762\u662f\u4e00\u4e2a\u7b80\u5355\u7684\u4ee3\u7801\u793a\u4f8b\uff1a \/\/ \u524d\u7aef\u7f51\u9875\u5f00\u53d1 &lt;title&gt;\u6d3b\u52a8\u53d1\u5e03&lt;\/title&gt; \u767b\u5f55\u540e\u590d\u5236 \u6d3b\u52a8\u6807\u9898: \u6d3b\u52a8\u5185\u5bb9: \/\/ [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-24569","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/24569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=24569"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/24569\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=24569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=24569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=24569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}