chore: initialize lhbfx project and documentation
This commit is contained in:
32
start-dev.ps1
Normal file
32
start-dev.ps1
Normal file
@ -0,0 +1,32 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$LogDir = Join-Path $Root "logs"
|
||||
New-Item -ItemType Directory -Force -Path $LogDir | Out-Null
|
||||
|
||||
$BackendOut = Join-Path $LogDir "backend.out.log"
|
||||
$BackendErr = Join-Path $LogDir "backend.err.log"
|
||||
$FrontendOut = Join-Path $LogDir "frontend.out.log"
|
||||
$FrontendErr = Join-Path $LogDir "frontend.err.log"
|
||||
|
||||
$Backend = Start-Process `
|
||||
-FilePath "python" `
|
||||
-ArgumentList "scripts/run_api.py" `
|
||||
-WorkingDirectory (Join-Path $Root "backend") `
|
||||
-RedirectStandardOutput $BackendOut `
|
||||
-RedirectStandardError $BackendErr `
|
||||
-PassThru
|
||||
|
||||
$Frontend = Start-Process `
|
||||
-FilePath "npm.cmd" `
|
||||
-ArgumentList "run", "dev", "--", "--host", "127.0.0.1", "--port", "5173" `
|
||||
-WorkingDirectory (Join-Path $Root "frontend") `
|
||||
-RedirectStandardOutput $FrontendOut `
|
||||
-RedirectStandardError $FrontendErr `
|
||||
-PassThru
|
||||
|
||||
Write-Host "Backend PID: $($Backend.Id)"
|
||||
Write-Host "Frontend PID: $($Frontend.Id)"
|
||||
Write-Host "Frontend URL: http://127.0.0.1:5173/"
|
||||
Write-Host "Backend URL: http://127.0.0.1:8000/"
|
||||
Write-Host "Logs: $LogDir"
|
||||
Reference in New Issue
Block a user