-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstart.ps1
29 lines (26 loc) · 908 Bytes
/
start.ps1
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
# Inicializar el servidor
Clear-Host
Write-Output 'Cargando el checker... por favor espere'
Write-Output 'Detectando codigo fuente...'
Start-Sleep -Seconds 3
# Configurar las rutas del servidor
$DIRECTORIO = 'Cheker CC Bsz - V0.0.0'
Write-Output "Codigo fuente cargado, utilizando: $DIRECTORIO"
Start-Sleep -Seconds 3
Clear-Host
# Verificar si PHP está instalado
if (-not (Get-Command php -ErrorAction SilentlyContinue)) {
Write-Output 'El servidor no está instalado. Instalando...'
winget install --id PHP.PHP.8.4
Clear-Host
Write-Output "Servidor instalado. Vuelva a ejecutar el script"
Start-Sleep -Seconds 3
Exit
} else {
Write-Output 'El servidor ya está instalado.'
Start-Sleep -Seconds 3
}
# Ejecutar el servidor
$IP = 'localhost:8000'
Write-Output "Ejecutando servidor en $IP, para cerrarlo, presione ctrl + c o cierre esta ventana"
php -S "$IP" -t "$DIRECTORIO"