win10一行代码搭建本地html项目
发布时间:2020-12-15 02:12:07 所属栏目:C语言 来源:网络整理
导读:最近玩了下web项目,需要部署到本地查看效果。 一:准备 1.安装python或者安装node.js 2.html项目文件 二:python搭建 1.进入html文件的路径 2.通过python命令部署 python -m http.server ? ?默认端口8000,如果需要修改端口则命令改为 python -m http.serve
最近玩了下web项目,需要部署到本地查看效果。 一:准备 1.安装python或者安装node.js 2.html项目文件 二:python搭建 1.进入html文件的路径 2.通过python命令部署 python -m http.server ? ?默认端口8000,如果需要修改端口则命令改为 python -m http.server 9000 三.通过node.js命令部署 安装http服务 cmd运行以下命令安装 npm install http-server -g
然后开始部署 1.进入html文件路径 2.执行命令 http-server 3.修改端口 http-server -p 9090
? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |