Chart / dataset /web /Plotly /bar /start_server.bat
Pekku's picture
Upload folder using huggingface_hub
79dc9c8 verified
@echo off
chcp 65001 >nul
title Python 本地服务器 + 打开 HTML
:: ===== 配置区 =====
set PORT=8001
set DIR=D:\Task_projects\data_collection\web\Vchart :: 改成你的文件夹
set CHROME="C:\Program Files\Google\Chrome\Application\chrome.exe"
:: ==================
cd /d %DIR%
echo 启动 Python HTTP 服务器(端口 %PORT%)...
start "" python -m http.server %PORT%
:: 等待服务器启动
timeout /t 2 >nul
echo 使用 Chrome 打开所有 HTML 文件...
for %%f in (*.html) do (
start "" %CHROME% http://localhost:%PORT%/%%f
)
echo.
echo 服务器已启动,HTML 已全部打开
echo 关闭本窗口将停止服务器
pause