{"id":17125,"date":"2025-04-18T23:32:37","date_gmt":"2025-04-18T15:32:37","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/17125.html"},"modified":"2025-04-18T23:32:37","modified_gmt":"2025-04-18T15:32:37","slug":"nodejs-%e6%90%ad%e5%bb%ba%e6%9c%ac%e5%9c%b0-%e5%85%ac%e7%bd%91%e6%9c%8d%e5%8a%a1%e5%99%a8-live-server-%e7%9a%84%e4%bd%bf%e7%94%a8%e4%b8%8e%e5%ae%89%e8%a3%85","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/17125.html","title":{"rendered":"NodeJS | \u642d\u5efa\u672c\u5730\/\u516c\u7f51\u670d\u52a1\u5668 live-server \u7684\u4f7f\u7528\u4e0e\u5b89\u88c5"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"%E4%BB%8B%E7%BB%8D-toc\" style=\"margin-left:0px\">\u4ecb\u7ecd<\/p>\n<p id=\"%E5%AE%89%E8%A3%85%20live-server-toc\" style=\"margin-left:0px\">\u5b89\u88c5 live-server<\/p>\n<p id=\"%E5%AE%89%E8%A3%85%E6%96%B9%E6%B3%95-toc\" style=\"margin-left:40px\">\u5b89\u88c5\u65b9\u6cd5<\/p>\n<p id=\"%E5%AE%89%E8%A3%85%E5%90%8E%E7%9A%84%E9%AA%8C%E8%AF%81-toc\" style=\"margin-left:40px\">\u5b89\u88c5\u540e\u7684\u9a8c\u8bc1<\/p>\n<p id=\"%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E9%97%AE%E9%A2%98-toc\" style=\"margin-left:0px\">\u73af\u5883\u53d8\u91cf\u95ee\u9898<\/p>\n<p id=\"Node.js%20%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E6%9C%AA%E9%85%8D%E7%BD%AE%E6%AD%A3%E7%A1%AE-toc\" style=\"margin-left:40px\">Node.js \u73af\u5883\u53d8\u91cf\u672a\u914d\u7f6e\u6b63\u786e<\/p>\n<p id=\"%E5%85%A8%E5%B1%80%E5%AE%89%E8%A3%85%E7%9A%84%20live-server%20%E8%B7%AF%E5%BE%84%E6%9C%AA%E6%B7%BB%E5%8A%A0%E5%88%B0%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F-toc\" style=\"margin-left:40px\">\u5168\u5c40\u5b89\u88c5\u7684 live-server \u8def\u5f84\u672a\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf<\/p>\n<p id=\"%E8%BF%90%E8%A1%8C%E6%B5%8B%E8%AF%95-toc\" style=\"margin-left:0px\">\u8fd0\u884c\u6d4b\u8bd5<\/p>\n<p id=\"%E9%BB%98%E8%AE%A4%E8%AE%BF%E9%97%AE%E4%B8%BB%E7%95%8C%E9%9D%A2-toc\" style=\"margin-left:40px\">\u9ed8\u8ba4\u8bbf\u95ee\u4e3b\u754c\u9762<\/p>\n<p id=\"%E8%AE%BF%E9%97%AE%E6%96%87%E4%BB%B6-toc\" style=\"margin-left:40px\">\u8bbf\u95ee\u6587\u4ef6<\/p>\n<p id=\"%E6%8A%A5%E9%94%99%E4%BF%A1%E6%81%AF%E4%B8%8E%E8%A7%A3%E5%86%B3-toc\" style=\"margin-left:0px\">\u62a5\u9519\u4fe1\u606f\u4e0e\u89e3\u51b3<\/p>\n<p id=\"%E9%97%AE%E9%A2%98%E4%B8%80%EF%BC%9A%E6%9C%AA%E7%9F%A5%E5%91%BD%E4%BB%A4-toc\" style=\"margin-left:40px\">\u95ee\u9898\u4e00&#xff1a;\u672a\u77e5\u547d\u4ee4<\/p>\n<p id=\"%E9%97%AE%E9%A2%98%E4%BA%8C%EF%BC%9A%E6%8B%92%E7%BB%9D%E8%84%9A%E6%9C%AC-toc\" style=\"margin-left:40px\">\u95ee\u9898\u4e8c&#xff1a;\u62d2\u7edd\u811a\u672c<\/p>\n<p id=\"%E5%85%AC%E7%BD%91%E9%85%8D%E7%BD%AE-toc\" style=\"margin-left:0px\">\u516c\u7f51\u914d\u7f6e<\/p>\n<hr \/>\n<h2 id=\"%E4%BB%8B%E7%BB%8D\">\u4ecb\u7ecd<\/h2>\n<p>Live Server&#xff1a;\u4e00\u4e2a\u5177\u6709\u5b9e\u65f6\u52a0\u8f7d\u529f\u80fd\u7684\u5c0f\u578b\u670d\u52a1\u5668&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u7834\u89e3html\/css\/javascript&#xff0c;\u4f46\u662f\u4e0d\u80fd\u7528\u4e8e\u90e8\u7f72\u6700\u7ec8\u7ad9\u70b9\u3002\u4e5f\u5c31\u662f\u8bf4\u6211\u4eec\u53ef\u4ee5\u5728\u9879\u76ee\u4e2d\u5b9e\u65f6\u7528live-server\u4f5c\u4e3a\u4e00\u4e2a\u5b9e\u65f6\u670d\u52a1\u5668\u5b9e\u65f6\u67e5\u770b\u5f00\u53d1\u7684\u7f51\u9875\u6216\u9879\u76ee\u6548\u679c\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1200\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418153232-6802709085992.png\" width=\"1200\" \/><\/p>\n<h2 id=\"%E5%AE%89%E8%A3%85%20live-server\">\u5b89\u88c5 live-server<\/h2>\n<li>\n<h3 id=\"%E5%AE%89%E8%A3%85%E6%96%B9%E6%B3%95\">\u5b89\u88c5\u65b9\u6cd5<\/h3>\n<ul>\n<li>\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f npm&#xff08;Node.js \u7684\u5305\u7ba1\u7406\u5668&#xff09;&#xff0c;\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b89\u88c5 live-server&#xff1a;<\/p>\n<p> npm install -g live-server <\/p>\n<p>\u8fd9\u91cc -g \u4ee3\u8868\u5168\u5c40\u5b89\u88c5&#xff0c;\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u4f60\u5c31\u53ef\u4ee5\u5728\u4efb\u4f55\u5730\u65b9\u4f7f\u7528 live-server \u547d\u4ee4\u4e86\u3002<\/p>\n<\/li>\n<li>\n<p>\u5982\u679c\u4f60\u4f7f\u7528\u7684\u662f yarn&#xff08;\u53e6\u4e00\u4e2a\u6d41\u884c\u7684\u5305\u7ba1\u7406\u5668&#xff09;&#xff0c;\u5b89\u88c5\u547d\u4ee4\u662f&#xff1a;<\/p>\n<p> yarn global add live-server <\/li>\n<\/ul>\n<\/li>\n<li>\n<h3 id=\"%E5%AE%89%E8%A3%85%E5%90%8E%E7%9A%84%E9%AA%8C%E8%AF%81\">\u5b89\u88c5\u540e\u7684\u9a8c\u8bc1<\/h3>\n<ul>\n<li>\n<p>\u5b89\u88c5\u5b8c\u6210\u540e&#xff0c;\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165 live-server &#8211;version \u6765\u67e5\u770b live-server \u7684\u7248\u672c\u53f7&#xff0c;\u5982\u679c\u80fd\u6b63\u5e38\u663e\u793a\u7248\u672c\u53f7&#xff0c;\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<h2 id=\"%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E9%97%AE%E9%A2%98\">\u73af\u5883\u53d8\u91cf\u95ee\u9898<\/h2>\n<li>\n<h3 id=\"Node.js%20%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E6%9C%AA%E9%85%8D%E7%BD%AE%E6%AD%A3%E7%A1%AE\">Node.js \u73af\u5883\u53d8\u91cf\u672a\u914d\u7f6e\u6b63\u786e<\/h3>\n<ul>\n<li>\n<p>\u5f53\u4f60\u5b89\u88c5 Node.js \u65f6&#xff0c;\u901a\u5e38\u4f1a\u81ea\u52a8\u914d\u7f6e\u73af\u5883\u53d8\u91cf\u3002\u4f46\u5982\u679c\u73af\u5883\u53d8\u91cf\u914d\u7f6e\u4e0d\u6b63\u786e&#xff0c;\u4f1a\u5bfc\u81f4\u65e0\u6cd5\u8bc6\u522b live-server \u547d\u4ee4\u3002\u4f60\u53ef\u4ee5\u68c0\u67e5\u73af\u5883\u53d8\u91cf&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5728 Windows \u7cfb\u7edf\u4e2d&#xff0c;\u53f3\u952e\u70b9\u51fb\u201c\u6b64\u7535\u8111\u201d\u6216\u201c\u8ba1\u7b97\u673a\u201d&#xff0c;\u9009\u62e9\u201c\u5c5e\u6027\u201d&#xff0c;\u7136\u540e\u70b9\u51fb\u201c\u9ad8\u7ea7\u7cfb\u7edf\u8bbe\u7f6e\u201d&#xff0c;\u5728\u201c\u7cfb\u7edf\u5c5e\u6027\u201d\u7a97\u53e3\u4e2d\u70b9\u51fb\u201c\u73af\u5883\u53d8\u91cf\u201d\u6309\u94ae\u3002\u5728\u201c\u7cfb\u7edf\u53d8\u91cf\u201d\u533a\u57df\u627e\u5230\u540d\u4e3a\u201cPath\u201d\u7684\u53d8\u91cf&#xff0c;\u67e5\u770b\u5176\u4e2d\u662f\u5426\u5305\u542b Node.js \u7684\u5b89\u88c5\u8def\u5f84&#xff08;\u5982 C:\\\\Program Files\\\\nodejs\\\\&#xff09;\u3002\u5982\u679c\u6ca1\u6709&#xff0c;\u53ef\u4ee5\u624b\u52a8\u6dfb\u52a0\u3002<\/p>\n<\/li>\n<li>\n<p>\u5728 macOS \u6216 Linux \u7cfb\u7edf\u4e2d&#xff0c;\u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4 echo $PATH \u67e5\u770b\u73af\u5883\u53d8\u91cf\u3002\u5982\u679c Node.js \u7684\u5b89\u88c5\u8def\u5f84\u4e0d\u5728\u5176\u4e2d&#xff0c;\u53ef\u4ee5\u7f16\u8f91 ~\/.bash_profile \u6216 ~\/.bashrc \u6587\u4ef6&#xff0c;\u6dfb\u52a0\u5982\u4e0b\u5185\u5bb9&#xff08;\u4ee5 Node.js \u5b89\u88c5\u5728 \/usr\/local\/bin\/node \u4e3a\u4f8b&#xff09;&#xff1a;<\/p>\n<p> export PATH&#061;$PATH:\/usr\/local\/bin\/node <\/p>\n<p>\u7136\u540e\u6267\u884c source ~\/.bash_profile \u6216 source ~\/.bashrc \u4f7f\u914d\u7f6e\u751f\u6548\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<h3 id=\"%E5%85%A8%E5%B1%80%E5%AE%89%E8%A3%85%E7%9A%84%20live-server%20%E8%B7%AF%E5%BE%84%E6%9C%AA%E6%B7%BB%E5%8A%A0%E5%88%B0%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F\">\u5168\u5c40\u5b89\u88c5\u7684 live-server \u8def\u5f84\u672a\u6dfb\u52a0\u5230\u73af\u5883\u53d8\u91cf<\/h3>\n<ul>\n<li>\n<p>\u5f53\u4f60\u4f7f\u7528 npm \u5168\u5c40\u5b89\u88c5 live-server \u65f6&#xff0c;\u5b83\u4f1a\u88ab\u5b89\u88c5\u5230 npm \u7684\u5168\u5c40\u5b89\u88c5\u76ee\u5f55\u3002\u8fd9\u4e2a\u76ee\u5f55\u53ef\u80fd\u4e0d\u5728\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u4f60\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u627e\u5230 npm \u7684\u5168\u5c40\u5b89\u88c5\u76ee\u5f55&#xff1a;<\/p>\n<p> npm root -g <\/p>\n<p>\u7136\u540e\u5c06\u8fd9\u4e2a\u76ee\u5f55\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d&#xff0c;\u5177\u4f53\u64cd\u4f5c\u540c\u4e0a\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<h2 id=\"%E8%BF%90%E8%A1%8C%E6%B5%8B%E8%AF%95\">\u8fd0\u884c\u6d4b\u8bd5<\/h2>\n<p>live-server &#8211;port&#061;8080 <\/p>\n<h3 id=\"%E9%BB%98%E8%AE%A4%E8%AE%BF%E9%97%AE%E4%B8%BB%E7%95%8C%E9%9D%A2\">\u9ed8\u8ba4\u8bbf\u95ee\u4e3b\u754c\u9762<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1036\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418153235-680270933879d.png\" width=\"1200\" \/><\/p>\n<h3 id=\"%E8%AE%BF%E9%97%AE%E6%96%87%E4%BB%B6\">\u8bbf\u95ee\u6587\u4ef6<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"482\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418153235-68027093db67a.png\" width=\"1200\" \/><\/p>\n<\/p>\n<h2 id=\"%E6%8A%A5%E9%94%99%E4%BF%A1%E6%81%AF%E4%B8%8E%E8%A7%A3%E5%86%B3\">\u62a5\u9519\u4fe1\u606f\u4e0e\u89e3\u51b3<\/h2>\n<h3 id=\"%E9%97%AE%E9%A2%98%E4%B8%80%EF%BC%9A%E6%9C%AA%E7%9F%A5%E5%91%BD%E4%BB%A4\">\u95ee\u9898\u4e00&#xff1a;\u672a\u77e5\u547d\u4ee4<\/h3>\n<p>PS D:\\\\Desktop\\\\chen&gt; live-server -port&#061;1111 <\/p>\n<p>live-server : The term &#039;live-server&#039; is not recognized as the name <\/p>\n<p>of a cmdlet, function, script file, or operable program. <\/p>\n<p>Check the spelling of the name, or if a path was included, <\/p>\n<p>verify that the path is correct and try again. <\/p>\n<p>At line:1 char:1 &#043; live-server -port&#061;1111 &#043; ~~~~~~~~~~~ &#043; CategoryInfo<\/p>\n<p>: ObjectNotFound: (live-server:String) [], Com mandNotFoundException &#043; <\/p>\n<p>FullyQualifiedErrorId : CommandNotFoundException <\/p>\n<p>\u5176\u5b9e\u5c31\u662f\u6ca1\u88c5\u6240\u4ee5\u4e0d\u77e5\u9053\u662f\u5565..\u53bb\u5f00\u5934\u7684\u5730\u65b9\u88c5\u4e00\u904d\u5c31\u884c\u4e86<\/p>\n<\/p>\n<h3 id=\"%E9%97%AE%E9%A2%98%E4%BA%8C%EF%BC%9A%E6%8B%92%E7%BB%9D%E8%84%9A%E6%9C%AC\">\u95ee\u9898\u4e8c&#xff1a;\u62d2\u7edd\u811a\u672c<\/h3>\n<p>PS D:\\\\Desktop\\\\chen&gt; npm install -g live-server<br \/>\nnpm : File D:\\\\nodejs\\\\npm.ps1 cannot be loaded<br \/>\nbecause running scripts is disabled on this system.<br \/>\nFor more information, see about_Execution_Policies<br \/>\nat https:\/go.microsoft.com\/fwlink\/?LinkID&#061;135170.<br \/>\nAt line:1 char:1 &#043; npm install -g live-server &#043; ~~~<br \/>\n&#043; CategoryInfo : SecurityError: (:) [],<br \/>\nPSSecurityException &#043; FullyQualifiedErrorId :<br \/>\n UnauthorizedAccess PS D:\\\\Desktop\\\\chen&gt; yarn global<br \/>\nadd live-server yarn : File C:\\\\Users\\\\Administrator\\\\AppData<br \/>\n\\\\Roaming\\\\npm\\\\yarn.ps1 cannot be loaded because running<br \/>\nscripts is disabled on this system. For more information,<br \/>\nsee about_Execution_Policies at https:\/go.microsoft.com\/<br \/>\nfwlink\/?LinkID&#061;135170. At line:1 char:1 &#043; yarn global add<br \/>\nlive-server &#043; ~~~~ &#043; CategoryInfo : SecurityError: (:) [],<br \/>\nPSSecurityException &#043; FullyQualifiedErrorId :<br \/>\nUnauthorizedAccess PS D:\\\\Desktop\\\\chen&gt; <\/p>\n<p>\u6743\u9650\u4e0d\u591f\u9700\u8981\u63d0\u6743&#xff0c;\u4e14\u5141\u8bb8\u811a\u672c\u5199\u5165<\/p>\n<p>\u51fa\u73b0\u8fd9\u4e2a\u9519\u8bef\u662f\u56e0\u4e3a PowerShell \u7684\u6267\u884c\u7b56\u7565\u8bbe\u7f6e\u5f97\u8fc7\u4e8e\u4e25\u683c&#xff0c;\u963b\u6b62\u4e86\u811a\u672c\u7684\u8fd0\u884c\u3002\u4f60\u53ef\u4ee5\u6309\u7167\u4ee5\u4e0b\u6b65\u9aa4\u8c03\u6574 PowerShell \u6267\u884c\u7b56\u7565\u6765\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898&#xff1a;<\/p>\n<li>\n<p>\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c PowerShell&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u53f3\u952e\u70b9\u51fb\u5f00\u59cb\u83dc\u5355&#xff0c;\u9009\u62e9\u201cWindows PowerShell (\u7ba1\u7406\u5458)\u201d\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u67e5\u770b\u5f53\u524d\u6267\u884c\u7b56\u7565&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5728\u6253\u5f00\u7684 PowerShell \u7a97\u53e3\u4e2d&#xff0c;\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u6765\u67e5\u770b\u5f53\u524d\u7684\u6267\u884c\u7b56\u7565&#xff1a;<\/p>\n<p> Get-ExecutionPolicy <\/li>\n<li>\n<p>\u5982\u679c\u7ed3\u679c\u663e\u793a\u4e3a Restricted&#xff0c;\u5219\u9700\u8981\u66f4\u6539\u6b64\u8bbe\u7f6e\u4ee5\u5141\u8bb8\u811a\u672c\u8fd0\u884c\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u8bbe\u7f6e\u65b0\u7684\u6267\u884c\u7b56\u7565&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5efa\u8bae\u5c06\u6267\u884c\u7b56\u7565\u4fee\u6539\u4e3a RemoteSigned&#xff0c;\u8be5\u6a21\u5f0f\u4e0b\u4ec5\u5141\u8bb8\u672c\u5730\u521b\u5efa\u7684\u811a\u672c\u65e0\u6761\u4ef6\u6267\u884c&#xff1b;\u5bf9\u4e8e\u6765\u81ea\u4e92\u8054\u7f51\u6216\u5176\u4ed6\u8ba1\u7b97\u673a\u4e0a\u7684\u811a\u672c&#xff0c;\u5219\u9700\u5177\u5907\u6709\u6548\u7684\u6570\u5b57\u7b7e\u540d\u624d\u80fd\u88ab\u6267\u884c\u3002\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u5b8c\u6210\u53d8\u66f4&#xff1a;<\/p>\n<p> Set-ExecutionPolicy RemoteSigned <\/li>\n<li>\n<p>\u7cfb\u7edf\u53ef\u80fd\u4f1a\u63d0\u793a\u786e\u8ba4\u64cd\u4f5c&#xff0c;\u8bf7\u6309\u6307\u793a\u540c\u610f\u66f4\u6539\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u9a8c\u8bc1\u66f4\u65b0\u540e\u7684\u6267\u884c\u7b56\u7565&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u518d\u6b21\u4f7f\u7528 Get-ExecutionPolicy \u547d\u4ee4\u6765\u9a8c\u8bc1\u65b0\u8bbe\u5b9a\u662f\u5426\u751f\u6548\u3002<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<p>\u5b8c\u6210\u4ee5\u4e0a\u6b65\u9aa4\u540e&#xff0c;\u5c1d\u8bd5\u91cd\u65b0\u8fd0\u884c npm install -g live-server \u6216 yarn global add live-server \u547d\u4ee4&#xff0c;\u5e94\u8be5\u5c31\u53ef\u4ee5\u6210\u529f\u5b89\u88c5 live-server \u4e86\u3002<\/p>\n<\/p>\n<h2 id=\"%E5%85%AC%E7%BD%91%E9%85%8D%E7%BD%AE\">\u516c\u7f51\u914d\u7f6e<\/h2>\n<p>\u53ef\u4ee5\u5229\u7528\u7b2c\u4e09\u65b9 \u5185\u7f51\u7a7f\u900f\u8f6f\u4ef6\u5b8c\u6210&#xff1a;\u6a31\u82b1&#xff0c;\u82b1\u751f\u58f3\u7b49<\/p>\n<hr \/>\n<p style=\"text-align:center\"><span style=\"color:#d7d8d9\">\u6709\u559c\u6b22\u7684\u5c0f\u4f19\u4f34\u53ef\u4ee5\u53bb vx\u516c\u68d5\u53f7: <\/span><span style=\"color:#ed7976\">wmcode <\/span><span style=\"color:#d7d8d9\">\u770b\u770b&#xff0c;\u6216\u8bb8\u6709\u4f60\u60f3\u8981\u7684<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u4e00\u4e2a\u5177\u6709\u5b9e\u65f6\u52a0\u8f7d\u529f\u80fd\u7684\u5c0f\u578b\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u7834\u89e3html\/css\/javascript\uff0c\u4f46\u662f\u4e0d\u80fd\u7528\u4e8e\u90e8\u7f72\u6700\u7ec8\u7ad9\u70b9\u3002\u4e5f\u5c31\u662f\u8bf4\u6211\u4eec\u53ef\u4ee5\u5728\u9879\u76ee\u4e2d\u5b9e\u65f6\u7528live-server\u4f5c\u4e3a\u4e00\u4e2a\u5b9e\u65f6\u670d\u52a1\u5668\u5b9e\u65f6\u67e5\u770b\u5f00\u53d1\u7684\u7f51\u9875\u6216\u9879\u76ee\u6548\u679c\u3002\u5b89\u88c5 live-server\u5b89\u88c5\u65b9\u6cd5\u8fd9\u91cc-g\u4ee3\u8868\u5168\u5c40\u5b89\u88c5\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u5c31\u53ef\u4ee5\u5728\u4efb\u4f55\u5730\u65b9\u4f7f\u7528\u547d\u4ee4\u4e86\u3002\u5b89\u88c5\u540e\u7684\u9a8c\u8bc1\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u6765\u67e5\u770b live-server \u7684\u7248\u672c\u53f7\uff0c\u5982\u679c\u80fd\u6b63\u5e38\u663e\u793a\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002\u73af\u5883\u53d8\u91cf\u95ee\u9898Node.js \u73af\u5883\u53d8\u91cf\u672a\u914d\u7f6e\u6b63\u786e\u3002_live-server\u5b89\u88c5<\/p>\n","protected":false},"author":2,"featured_media":17122,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[187,1247,87,43],"topic":[],"class_list":["post-17125","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-javascript","tag-windows","tag-87","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>NodeJS | \u642d\u5efa\u672c\u5730\/\u516c\u7f51\u670d\u52a1\u5668 live-server \u7684\u4f7f\u7528\u4e0e\u5b89\u88c5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/17125.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"NodeJS | \u642d\u5efa\u672c\u5730\/\u516c\u7f51\u670d\u52a1\u5668 live-server \u7684\u4f7f\u7528\u4e0e\u5b89\u88c5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u4e00\u4e2a\u5177\u6709\u5b9e\u65f6\u52a0\u8f7d\u529f\u80fd\u7684\u5c0f\u578b\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u7834\u89e3html\/css\/javascript\uff0c\u4f46\u662f\u4e0d\u80fd\u7528\u4e8e\u90e8\u7f72\u6700\u7ec8\u7ad9\u70b9\u3002\u4e5f\u5c31\u662f\u8bf4\u6211\u4eec\u53ef\u4ee5\u5728\u9879\u76ee\u4e2d\u5b9e\u65f6\u7528live-server\u4f5c\u4e3a\u4e00\u4e2a\u5b9e\u65f6\u670d\u52a1\u5668\u5b9e\u65f6\u67e5\u770b\u5f00\u53d1\u7684\u7f51\u9875\u6216\u9879\u76ee\u6548\u679c\u3002\u5b89\u88c5 live-server\u5b89\u88c5\u65b9\u6cd5\u8fd9\u91cc-g\u4ee3\u8868\u5168\u5c40\u5b89\u88c5\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u5c31\u53ef\u4ee5\u5728\u4efb\u4f55\u5730\u65b9\u4f7f\u7528\u547d\u4ee4\u4e86\u3002\u5b89\u88c5\u540e\u7684\u9a8c\u8bc1\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u6765\u67e5\u770b live-server \u7684\u7248\u672c\u53f7\uff0c\u5982\u679c\u80fd\u6b63\u5e38\u663e\u793a\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002\u73af\u5883\u53d8\u91cf\u95ee\u9898Node.js \u73af\u5883\u53d8\u91cf\u672a\u914d\u7f6e\u6b63\u786e\u3002_live-server\u5b89\u88c5\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/17125.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T15:32:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418153232-6802709085992.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/17125.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/17125.html\",\"name\":\"NodeJS | \u642d\u5efa\u672c\u5730\/\u516c\u7f51\u670d\u52a1\u5668 live-server \u7684\u4f7f\u7528\u4e0e\u5b89\u88c5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T15:32:37+00:00\",\"dateModified\":\"2025-04-18T15:32:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/17125.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/17125.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/17125.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"NodeJS | \u642d\u5efa\u672c\u5730\/\u516c\u7f51\u670d\u52a1\u5668 live-server \u7684\u4f7f\u7528\u4e0e\u5b89\u88c5\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"NodeJS | \u642d\u5efa\u672c\u5730\/\u516c\u7f51\u670d\u52a1\u5668 live-server \u7684\u4f7f\u7528\u4e0e\u5b89\u88c5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/17125.html","og_locale":"zh_CN","og_type":"article","og_title":"NodeJS | \u642d\u5efa\u672c\u5730\/\u516c\u7f51\u670d\u52a1\u5668 live-server \u7684\u4f7f\u7528\u4e0e\u5b89\u88c5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1k\u6b21\uff0c\u70b9\u8d5e22\u6b21\uff0c\u6536\u85cf9\u6b21\u3002\u4e00\u4e2a\u5177\u6709\u5b9e\u65f6\u52a0\u8f7d\u529f\u80fd\u7684\u5c0f\u578b\u670d\u52a1\u5668\uff0c\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u7834\u89e3html\/css\/javascript\uff0c\u4f46\u662f\u4e0d\u80fd\u7528\u4e8e\u90e8\u7f72\u6700\u7ec8\u7ad9\u70b9\u3002\u4e5f\u5c31\u662f\u8bf4\u6211\u4eec\u53ef\u4ee5\u5728\u9879\u76ee\u4e2d\u5b9e\u65f6\u7528live-server\u4f5c\u4e3a\u4e00\u4e2a\u5b9e\u65f6\u670d\u52a1\u5668\u5b9e\u65f6\u67e5\u770b\u5f00\u53d1\u7684\u7f51\u9875\u6216\u9879\u76ee\u6548\u679c\u3002\u5b89\u88c5 live-server\u5b89\u88c5\u65b9\u6cd5\u8fd9\u91cc-g\u4ee3\u8868\u5168\u5c40\u5b89\u88c5\uff0c\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u4f60\u5c31\u53ef\u4ee5\u5728\u4efb\u4f55\u5730\u65b9\u4f7f\u7528\u547d\u4ee4\u4e86\u3002\u5b89\u88c5\u540e\u7684\u9a8c\u8bc1\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u6765\u67e5\u770b live-server \u7684\u7248\u672c\u53f7\uff0c\u5982\u679c\u80fd\u6b63\u5e38\u663e\u793a\u7248\u672c\u53f7\uff0c\u8bf4\u660e\u5b89\u88c5\u6210\u529f\u3002\u73af\u5883\u53d8\u91cf\u95ee\u9898Node.js \u73af\u5883\u53d8\u91cf\u672a\u914d\u7f6e\u6b63\u786e\u3002_live-server\u5b89\u88c5","og_url":"https:\/\/www.wsisp.com\/helps\/17125.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T15:32:37+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418153232-6802709085992.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/17125.html","url":"https:\/\/www.wsisp.com\/helps\/17125.html","name":"NodeJS | \u642d\u5efa\u672c\u5730\/\u516c\u7f51\u670d\u52a1\u5668 live-server \u7684\u4f7f\u7528\u4e0e\u5b89\u88c5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T15:32:37+00:00","dateModified":"2025-04-18T15:32:37+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/17125.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/17125.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/17125.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"NodeJS | \u642d\u5efa\u672c\u5730\/\u516c\u7f51\u670d\u52a1\u5668 live-server \u7684\u4f7f\u7528\u4e0e\u5b89\u88c5"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/17125","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=17125"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/17125\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/17122"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=17125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=17125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=17125"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=17125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}