{"id":21298,"date":"2024-11-19T09:50:49","date_gmt":"2024-11-19T01:50:49","guid":{"rendered":"https:\/\/fwq.ai\/blog\/21298\/"},"modified":"2024-11-19T09:50:49","modified_gmt":"2024-11-19T01:50:49","slug":"vscode%e6%80%8e%e4%b9%88%e5%88%9b%e5%bb%baweb%e9%a1%b9%e7%9b%ae","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/21298\/","title":{"rendered":"vscode\u600e\u4e48\u521b\u5efaweb\u9879\u76ee"},"content":{"rendered":"<blockquote><p>\n  \u5728 vscode \u4e2d\u521b\u5efa web \u9879\u76ee\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u5b89\u88c5\u5fc5\u5907\u6269\u5c55\u548c\u521b\u5efa\u65b0\u9879\u76ee\uff1b\u914d\u7f6e\u9879\u76ee\uff0c\u5305\u62ec\u5b89\u88c5\u4f9d\u8d56\u9879\u548c\u521b\u5efa\u914d\u7f6e\u6587\u4ef6\uff1b\u521b\u5efa web \u5e94\u7528\u7a0b\u5e8f\uff0c\u5305\u62ec html \u9875\u9762\u548c javascript\/python \u903b\u8f91\u6587\u4ef6\uff1b\u8fd0\u884c\u9879\u76ee\uff0c\u4f7f\u7528 npm \u6216 pip \u547d\u4ee4\uff1b\u8c03\u8bd5\u9879\u76ee\uff0c\u8bbe\u7f6e\u65ad\u70b9\u5e76\u4f7f\u7528\u8c03\u8bd5\u89c6\u56fe\u3002\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202405\/15\/2024051507181821209.jpg\" class=\"aligncenter\" title=\"vscode\u600e\u4e48\u521b\u5efaweb\u9879\u76ee\u63d2\u56fe\" alt=\"vscode\u600e\u4e48\u521b\u5efaweb\u9879\u76ee\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u5728 VSCode \u4e2d\u521b\u5efa Web \u9879\u76ee<\/strong><\/p>\n<p><strong>1. \u5b89\u88c5\u5fc5\u8981\u7684\u6269\u5c55\u7a0b\u5e8f<\/strong><\/p>\n<ul>\n<li> <strong>Node.js extension:<\/strong> \u652f\u6301 Node.js \u5f00\u53d1\u3002<\/li>\n<li> <strong>Python extension:<\/strong> \u652f\u6301 Python \u5f00\u53d1\u3002<\/li>\n<li> <strong>HTML\/CSS Support:<\/strong> \u63d0\u4f9b HTML \u548c CSS \u4ee3\u7801\u7684\u8bed\u6cd5\u9ad8\u4eae\u548c\u4ee3\u7801\u7247\u6bb5\u3002<\/li>\n<\/ul>\n<p><strong>2. \u521b\u5efa\u65b0\u9879\u76ee<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00 VSCode \u5e76\u8f6c\u5230\u201c\u6587\u4ef6\u201d&gt;\u201c\u65b0\u5efa\u201d&gt;\u201c\u9879\u76ee\u201d\u3002<\/li>\n<li>\u9009\u62e9\u4e00\u4e2a\u9879\u76ee\u6587\u4ef6\u5939\uff0c\u5e76\u5c06\u9879\u76ee\u7c7b\u578b\u8bbe\u7f6e\u4e3a\u201cNode.js\u201d\u6216\u201cPython\u201d\u3002<\/li>\n<li>\u4e3a\u9879\u76ee\u547d\u540d\u5e76\u521b\u5efa\u5b83\u3002<\/li>\n<\/ul>\n<p><strong>3. \u914d\u7f6e\u9879\u76ee<\/strong><\/p>\n<p><strong>Node.js \u9879\u76ee\uff1a<\/strong><\/p>\n<ul>\n<li>\u521b\u5efa\u4e00\u4e2a package.json \u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u9879\u76ee\u4f9d\u8d56\u9879\u548c\u542f\u52a8\u811a\u672c\u3002<\/li>\n<li>\u5b89\u88c5\u5fc5\u8981\u7684 npm \u5305\uff1anpm install\u3002<\/li>\n<\/ul>\n<p><strong>Python \u9879\u76ee\uff1a<\/strong><\/p>\n<ul>\n<li>\u521b\u5efa\u4e00\u4e2a requirements.txt \u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u9879\u76ee\u4f9d\u8d56\u9879\u3002<\/li>\n<li>\u5b89\u88c5\u5fc5\u8981\u7684 pip \u5305\uff1apip install -r requirements.txt\u3002<\/li>\n<\/ul>\n<p><strong>4. \u521b\u5efa web \u5e94\u7528\u7a0b\u5e8f<\/strong><\/p>\n<ul>\n<li>\u521b\u5efa\u4e00\u4e2a index.html \u6587\u4ef6\u548c\u4e00\u4e2a\u7528\u4e8e\u6258\u7ba1\u5e94\u7528\u7a0b\u5e8f\u903b\u8f91\u7684 JavaScript \u6216 Python \u6587\u4ef6\u3002<\/li>\n<li>\u5c06 HTML \u548c JavaScript\/Python \u6587\u4ef6\u94fe\u63a5\u5230 index.html \u4e2d\u3002<\/li>\n<\/ul>\n<p><strong>5. \u8fd0\u884c\u9879\u76ee<\/strong><\/p>\n<p><strong>Node.js \u9879\u76ee\uff1a<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528\u547d\u4ee4 npm run start \u8fd0\u884c\u9879\u76ee\u3002<\/li>\n<\/ul>\n<p><strong>Python \u9879\u76ee\uff1a<\/strong><\/p>\n<ul>\n<li>\u4f7f\u7528\u547d\u4ee4  app.py \u8fd0\u884c\u9879\u76ee\u3002<\/li>\n<\/ul>\n<p><strong>6. \u8c03\u8bd5\u9879\u76ee<\/strong><\/p>\n<ul>\n<li>\u6253\u5f00\u201c\u8c03\u8bd5\u201d\u89c6\u56fe\u5e76\u8bbe\u7f6e\u65ad\u70b9\u3002<\/li>\n<li>\u5355\u51fb\u201c\u5f00\u59cb\u8c03\u8bd5\u201d\u6309\u94ae\u4ee5\u8fd0\u884c\u9879\u76ee\u5e76\u8fdb\u884c\u8c03\u8bd5\u3002<\/li>\n<\/ul>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u521b\u5efa\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>\u5728 vscode \u4e2d\u521b\u5efa web \u9879\u76ee\u7684\u6b65\u9aa4\u5982\u4e0b\uff1a\u5b89\u88c5\u5fc5\u5907\u6269\u5c55\u548c\u521b\u5efa\u65b0\u9879\u76ee\uff1b\u914d\u7f6e\u9879\u76ee\uff0c\u5305\u62ec\u5b89\u88c5\u4f9d\u8d56\u9879\u548c\u521b\u5efa\u914d\u7f6e\u6587\u4ef6\uff1b\u521b\u5efa web \u5e94\u7528\u7a0b\u5e8f\uff0c\u5305\u62ec html \u9875\u9762\u548c javascript\/python \u903b\u8f91\u6587\u4ef6\uff1b\u8fd0\u884c\u9879\u76ee\uff0c\u4f7f\u7528 npm \u6216 pip \u547d\u4ee4\uff1b\u8c03\u8bd5\u9879\u76ee\uff0c\u8bbe\u7f6e\u65ad\u70b9\u5e76\u4f7f\u7528\u8c03\u8bd5\u89c6\u56fe\u3002 \u5982\u4f55\u5728 VSCode \u4e2d\u521b\u5efa Web \u9879\u76ee 1. \u5b89\u88c5\u5fc5\u8981\u7684\u6269\u5c55\u7a0b\u5e8f Node.js extension: \u652f\u6301 Node.js \u5f00\u53d1\u3002 Python extension: \u652f\u6301 Python \u5f00\u53d1\u3002 HTML\/CSS Support: \u63d0\u4f9b HTML \u548c CSS \u4ee3\u7801\u7684\u8bed\u6cd5\u9ad8\u4eae\u548c\u4ee3\u7801\u7247\u6bb5\u3002 2. \u521b\u5efa\u65b0\u9879\u76ee \u6253\u5f00 VSCode \u5e76\u8f6c\u5230\u201c\u6587\u4ef6\u201d&gt;\u201c\u65b0\u5efa\u201d&gt;\u201c\u9879\u76ee\u201d\u3002 \u9009\u62e9\u4e00\u4e2a\u9879\u76ee\u6587\u4ef6\u5939\uff0c\u5e76\u5c06\u9879\u76ee\u7c7b\u578b\u8bbe\u7f6e\u4e3a\u201cNode.js\u201d\u6216\u201cPython\u201d\u3002 \u4e3a\u9879\u76ee\u547d\u540d\u5e76\u521b\u5efa\u5b83\u3002 3. \u914d\u7f6e\u9879\u76ee Node.js \u9879\u76ee\uff1a \u521b\u5efa\u4e00\u4e2a package.json \u6587\u4ef6\uff0c\u5176\u4e2d\u5305\u542b\u9879\u76ee\u4f9d\u8d56\u9879\u548c\u542f\u52a8\u811a\u672c\u3002 \u5b89\u88c5\u5fc5\u8981\u7684 npm [&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-21298","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21298","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=21298"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/21298\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=21298"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=21298"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=21298"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}