-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.ps1
More file actions
34 lines (29 loc) · 850 Bytes
/
run.ps1
File metadata and controls
34 lines (29 loc) · 850 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
Write-Host "Starting Phoenix VPN Server..."
Write-Host ""
# Check if Elixir is installed
if (-not (Get-Command elixir -ErrorAction SilentlyContinue)) {
Write-Host "Error: Elixir is not installed or not in PATH"
Write-Host "Please install Elixir from https://elixir-lang.org/install.html"
exit 1
}
# Check if dependencies are installed
Write-Host "Checking dependencies..."
mix deps.get
if ($LASTEXITCODE -ne 0) {
Write-Host "Error: Failed to get dependencies"
exit 1
}
# Compile the project
Write-Host "Compiling project..."
mix compile
if ($LASTEXITCODE -ne 0) {
Write-Host "Error: Failed to compile project"
exit 1
}
# Start the VPN server
Write-Host ""
Write-Host "Phoenix VPN Server is starting..."
Write-Host "Press Ctrl+C to stop the server"
Write-Host ""
# Start the server in the foreground
mix run --no-halt