Files
intrusion-detection/start.ps1
T

22 lines
675 B
PowerShell

<#
.SYNOPSIS
Starts the flask application in a virtual environment.
.DESCRIPTION
This script activates the virtual environment and starts the flask application.
It only runs a single threaded instance of the application, so it is not suitable for production use.
#>
## Check if the virtual environment exists
if (-Not (Test-Path -Path ".\.venv\Scripts\Activate.ps1")) {
Write-Host "Virtual environment not found. Please create it first."
exit 1
}
## Activate the virtual environment
& .\.venv\Scripts\Activate.ps1
## Start the Flask application
Write-Host "Starting the Flask application..."
& .\.venv\Scripts\python.exe .\app.py