-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path启动.bat
More file actions
39 lines (33 loc) · 833 Bytes
/
Copy path启动.bat
File metadata and controls
39 lines (33 loc) · 833 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
@echo off
chcp 65001 >nul
title LAN File Share - 局域网文件共享
cd /d "%~dp0"
where node >nul 2>nul
if errorlevel 1 (
echo [错误] 未检测到 Node.js,请先安装:https://nodejs.org
pause
exit /b 1
)
if not exist "node_modules\" (
echo 首次运行,正在安装依赖,请稍候...
call npm install
if errorlevel 1 (
echo [错误] 依赖安装失败
pause
exit /b 1
)
echo.
)
echo ========================================
echo LAN File Share - 局域网文件共享
echo ========================================
echo 本机: http://localhost:3456
echo 关闭此窗口即可停止服务
echo ========================================
echo.
timeout /t 1 /nobreak >nul
start "" "http://localhost:3456"
call npm run dev
echo.
echo 服务已停止
pause