-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
42 lines (36 loc) · 815 Bytes
/
Copy pathstart.bat
File metadata and controls
42 lines (36 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
@echo off
chcp 65001 >nul
echo ====================================
echo CardScroller 启动脚本
echo ====================================
echo.
echo [1/3] 检查Python环境...
where python >nul 2>&1
if %errorlevel% equ 0 (
echo [√] 找到 python 命令
set PYTHON_CMD=python
goto :start_server
)
where py >nul 2>&1
if %errorlevel% equ 0 (
echo [√] 找到 py 命令
set PYTHON_CMD=py
goto :start_server
)
echo [×] 未找到Python,请先安装Python
echo.
echo 下载地址:https://python.org
echo.
pause
exit /b 1
:start_server
echo.
echo [2/3] 启动本地服务器...
echo.
echo 服务器地址:http://localhost:8000
echo 按 Ctrl+C 可停止服务器
echo.
echo ====================================
echo.
start http://localhost:8000
%PYTHON_CMD% -m http.server 8000