| 123456789101112131415161718 |
- # GreaterWMS 后端启动脚本 (Windows PowerShell版本)
- # 此脚本会启动Django后端服务
- Write-Host "启动GreaterWMS后端服务..." -ForegroundColor Cyan
- # 获取脚本所在目录
- $ScriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
- Set-Location $ScriptDir
- # 执行数据库迁移
- Write-Host "执行数据库迁移..." -ForegroundColor Yellow
- python manage.py makemigrations
- python manage.py migrate
- # 启动Daphne服务器
- Write-Host "启动后端服务 (端口: 8008)..." -ForegroundColor Green
- Write-Host "服务地址: http://0.0.0.0:8008" -ForegroundColor Cyan
- daphne -b 0.0.0.0 -p 8008 greaterwms.asgi:application
|