-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.bat
More file actions
64 lines (51 loc) · 1.23 KB
/
start.bat
File metadata and controls
64 lines (51 loc) · 1.23 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
@echo off
chcp 65001 >nul
setlocal EnableDelayedExpansion
title Video Sunucu (CTRL+C ile kapat)
cd /d "%~dp0"
echo.
echo ================================
echo Video Sunucu başlatılıyor
echo ================================
echo.
if not exist "node_modules" (
echo Bağımlılıklar yükleniyor...
call npm install
echo.
)
echo IP adresi bulunuyor...
echo.
set IP=
for /f "tokens=2 delims=:" %%A in ('ipconfig ^| findstr "IPv4"') do (
if not defined IP (
set IP=%%A
)
)
set IP=!IP: =!
set QR_URL=http://!IP!:3333
echo ================================
echo Telefonda gir:
echo http://!IP!:3333
echo ================================
echo.
echo QR KOD (telefonla okut):
echo.
where node >nul 2>&1
if %ERRORLEVEL% equ 0 (
node -e "require('qrcode-terminal').generate('%QR_URL%', { small: true });"
) else (
echo Node.js bulunamadı - QR atlandı. Yukarıdaki adresi kullanın.
)
echo.
echo ================================
echo Sunucu çalışıyor...
echo Kapatmak için CTRL + C
echo ================================
echo.
node server.js
echo.
echo ================================
echo Sunucu durduruldu
echo Pencereyi kapatmak için bir tuşa basın
echo ================================
pause