{"id":20975,"date":"2024-11-19T17:32:25","date_gmt":"2024-11-19T09:32:25","guid":{"rendered":"https:\/\/fwq.ai\/blog\/20975\/"},"modified":"2024-11-19T17:32:25","modified_gmt":"2024-11-19T09:32:25","slug":"webstorm%e6%80%8e%e4%b9%88%e5%92%8c%e5%90%8e%e7%ab%af%e5%af%b9%e6%8e%a5","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/20975\/","title":{"rendered":"webstorm\u600e\u4e48\u548c\u540e\u7aef\u5bf9\u63a5"},"content":{"rendered":"<blockquote><p>\n  webstorm \u53ef\u7528\u4e8e\u8f7b\u677e\u5730\u4e0e\u540e\u7aef\u670d\u52a1\u5bf9\u63a5\u3002\u6b65\u9aa4\u5305\u62ec\uff1a\u5b89\u88c5 node.js \u63d2\u4ef6\u914d\u7f6e node.js \u8fd0\u884c\u65f6\u521b\u5efa\u540e\u7aef\u670d\u52a1\u8fde\u63a5\u5230\u540e\u7aef\u670d\u52a1\u5b89\u88c5 axios \u5e76\u5411\u540e\u7aef\u53d1\u9001\u8bf7\u6c42\u8bbe\u7f6e\u65ad\u70b9\u5e76\u8c03\u8bd5\u540e\u7aef\u4ee3\u7801\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202404\/08\/2024040813091742170.jpg\" class=\"aligncenter\" title=\"webstorm\u600e\u4e48\u548c\u540e\u7aef\u5bf9\u63a5\u63d2\u56fe\" alt=\"webstorm\u600e\u4e48\u548c\u540e\u7aef\u5bf9\u63a5\u63d2\u56fe\" \/><\/p>\n<p><strong>WebStorm \u4e0e\u540e\u7aef\u7684\u5bf9\u63a5<\/strong><\/p>\n<p>WebStorm \u662f\u4e00\u6b3e\u5f3a\u5927\u7684 JavaScript \u5f00\u53d1\u73af\u5883\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u4e0e\u540e\u7aef\u670d\u52a1\u8fdb\u884c\u5bf9\u63a5\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u7684\u6b65\u9aa4\uff1a<\/p>\n<p><strong>\u5b89\u88c5\u63d2\u4ef6<\/strong><\/p>\n<ul>\n<li>\u5b89\u88c5 Node.js \u548c npm\u3002<\/li>\n<li>\u5728 WebStorm \u4e2d\u5b89\u88c5 Node.js \u63d2\u4ef6\u3002<\/li>\n<\/ul>\n<p><strong>\u914d\u7f6e Node.js \u8fd0\u884c\u65f6<\/strong><\/p>\n<ul>\n<li>\u5728 WebStorm \u4e2d\u6253\u5f00 <strong>Preferences | Languages &amp; Frameworks | Node.js<\/strong>\u3002<\/li>\n<li>\u9009\u62e9 Node.js \u89e3\u91ca\u5668\u3002<\/li>\n<li>\u8bbe\u7f6e\u9879\u76ee\u6587\u4ef6\u5939\u4e3a Node.js \u6e90\u76ee\u5f55\u3002<\/li>\n<\/ul>\n<p><strong>\u521b\u5efa\u540e\u7aef\u670d\u52a1<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528 Node.js \u521b\u5efa\u4e00\u4e2a\u540e\u7aef\u670d\u52a1\u3002<\/li>\n<li>\u8bbe\u7f6e\u8def\u7531\u548c\u5904\u7406\u7a0b\u5e8f\u3002<\/li>\n<li>\u542f\u52a8\u670d\u52a1\u5668\u3002<\/li>\n<\/ul>\n<p><strong>\u8fde\u63a5\u5230\u540e\u7aef\u670d\u52a1<\/strong><\/p>\n<ul>\n<li>\u5728 WebStorm \u4e2d\u6253\u5f00 <strong>Run | Edit Configurations<\/strong>\u3002<\/li>\n<li>\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 Node.js \u914d\u7f6e\u3002<\/li>\n<li>\u5728 <strong>Script<\/strong> \u5b57\u6bb5\u4e2d\u6307\u5b9a\u540e\u7aef\u670d\u52a1\u7684\u5165\u53e3\u6587\u4ef6\u3002<\/li>\n<li>\u5728 <strong>Debugger<\/strong> \u9009\u9879\u5361\u4e2d\uff0c\u542f\u7528\u8fdc\u7a0b\u8c03\u8bd5\u3002<\/li>\n<\/ul>\n<p><strong>\u4f7f\u7528 Axios \u5e93<\/strong><\/p>\n<ul>\n<li>\u5b89\u88c5 Axios \u5e93\uff08npm install axios &#8211;save\uff09\u3002<\/li>\n<li>\u5728\u524d\u7aef\u4ee3\u7801\u4e2d\u5bfc\u5165 Axios\uff1aimport axios from &#8216;axios&#8217;;\u3002<\/li>\n<li>\u4f7f\u7528 Axios \u53d1\u9001\u8bf7\u6c42\u5230\u540e\u7aef\u670d\u52a1\uff1aawait axios.get(&#8216;\/api\/data&#8217;)\u3002<\/li>\n<\/ul>\n<p><strong>\u8c03\u8bd5\u540e\u7aef\u4ee3\u7801<\/strong><\/p>\n<ul>\n<li>\u5728 WebStorm \u4e2d\u8bbe\u7f6e\u65ad\u70b9\u3002<\/li>\n<li>\u8fd0\u884c\u540e\u7aef\u670d\u52a1\u3002<\/li>\n<li>\u9009\u62e9 <strong>Run | Debug Node.js<\/strong>\u3002<\/li>\n<li>\u5f53\u547d\u4e2d\u65ad\u70b9\u65f6\uff0cWebStorm \u5c06\u6682\u505c\u6267\u884c\u5e76\u5141\u8bb8\u60a8\u68c0\u67e5\u4ee3\u7801\u3002<\/li>\n<\/ul>\n<p><strong>\u5176\u4ed6\u63d0\u793a<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528\u73af\u5883\u53d8\u91cf\u9694\u79bb\u5f00\u53d1\u548c\u751f\u4ea7\u73af\u5883\u3002<\/li>\n<li>\u4f7f\u7528\u65e5\u5fd7\u8bb0\u5f55\u6765\u8ddf\u8e2a\u8bf7\u6c42\u548c\u9519\u8bef\u3002<\/li>\n<li>\u5229\u7528 WebStorm \u7684\u81ea\u52a8\u5b8c\u6210\u548c\u4ee3\u7801\u63d0\u793a\u529f\u80fd\u3002<\/li>\n<li>\u63a2\u7d22 DevTools \u9762\u677f\u4ee5\u5206\u6790\u7f51\u7edc\u8bf7\u6c42\u548c\u540e\u7aef\u54cd\u5e94\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u548c\u540e\u7aef\u5bf9\u63a5\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>webstorm \u53ef\u7528\u4e8e\u8f7b\u677e\u5730\u4e0e\u540e\u7aef\u670d\u52a1\u5bf9\u63a5\u3002\u6b65\u9aa4\u5305\u62ec\uff1a\u5b89\u88c5 node.js \u63d2\u4ef6\u914d\u7f6e node.js \u8fd0\u884c\u65f6\u521b\u5efa\u540e\u7aef\u670d\u52a1\u8fde\u63a5\u5230\u540e\u7aef\u670d\u52a1\u5b89\u88c5 axios \u5e76\u5411\u540e\u7aef\u53d1\u9001\u8bf7\u6c42\u8bbe\u7f6e\u65ad\u70b9\u5e76\u8c03\u8bd5\u540e\u7aef\u4ee3\u7801 WebStorm \u4e0e\u540e\u7aef\u7684\u5bf9\u63a5 WebStorm \u662f\u4e00\u6b3e\u5f3a\u5927\u7684 JavaScript \u5f00\u53d1\u73af\u5883\uff0c\u53ef\u4ee5\u8f7b\u677e\u5730\u4e0e\u540e\u7aef\u670d\u52a1\u8fdb\u884c\u5bf9\u63a5\u3002\u4ee5\u4e0b\u662f\u5177\u4f53\u7684\u6b65\u9aa4\uff1a \u5b89\u88c5\u63d2\u4ef6 \u5b89\u88c5 Node.js \u548c npm\u3002 \u5728 WebStorm \u4e2d\u5b89\u88c5 Node.js \u63d2\u4ef6\u3002 \u914d\u7f6e Node.js \u8fd0\u884c\u65f6 \u5728 WebStorm \u4e2d\u6253\u5f00 Preferences | Languages &amp; Frameworks | Node.js\u3002 \u9009\u62e9 Node.js \u89e3\u91ca\u5668\u3002 \u8bbe\u7f6e\u9879\u76ee\u6587\u4ef6\u5939\u4e3a Node.js \u6e90\u76ee\u5f55\u3002 \u521b\u5efa\u540e\u7aef\u670d\u52a1 \u4f7f\u7528 Node.js \u521b\u5efa\u4e00\u4e2a\u540e\u7aef\u670d\u52a1\u3002 \u8bbe\u7f6e\u8def\u7531\u548c\u5904\u7406\u7a0b\u5e8f\u3002 \u542f\u52a8\u670d\u52a1\u5668\u3002 \u8fde\u63a5\u5230\u540e\u7aef\u670d\u52a1 \u5728 WebStorm \u4e2d\u6253\u5f00 Run | [&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-20975","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20975","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=20975"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/20975\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=20975"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=20975"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=20975"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}