快速创建本地 Web 服务器

前言

除了用 node.js 快速搭建 web 服务器之外(可以参考 https://games.greggman.com/game/saving-and-loading-files-in-a-web-page/),今天分享如何通过 visual studio code 工具 + 插件,快速搭建 web 服务器。

准备
使用电脑安卓 Visual Studio Code 工具。

使用 Visual Studio Code 安装 Live Server 插件。
在这里插入图片描述
安装完成之后,点击右下角的 go Live,就可以在本地环境启动 web 服务器了
在这里插入图片描述
注意
启动 live server 会以当前 Visual Studio Code 打开的路径作为 web 服务器的资源路径,所以记得要打开对应的文件夹路径。

猜你喜欢

转载自blog.csdn.net/u014206745/article/details/123271372
今日推荐