From 67713e9ad57dea201ff136be06696a71d20ae921 Mon Sep 17 00:00:00 2001 From: ShaoHua <345265198@qqcom> Date: Thu, 22 Jan 2026 23:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=80=E9=94=AE=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 +++++++++++- run-dev.ps1 | 19 +++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 run-dev.ps1 diff --git a/README.md b/README.md index ffbe037..f68e639 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Hua.Abp.Demo +# Hua.Abp.Demo ## About this solution @@ -20,6 +20,16 @@ The solution comes with a default configuration that works out of the box. Howev * Run `abp install-libs` command on your solution folder to install client-side package dependencies. This step is automatically done when you create a new solution, if you didn't especially disabled it. However, you should run it yourself if you have first cloned this solution from your source control, or added a new client-side package dependency to your solution. * Run `Hua.Abp.Demo.DbMigrator` to create the initial database. This step is also automatically done when you create a new solution, if you didn't especially disabled it. This should be done in the first run. It is also needed if a new database migration is added to the solution later. +### Quick Start (One-click Run) + +We have provided a convenient PowerShell script to start both the Backend (HttpApi.Host) and Frontend (Angular) services simultaneously in separate windows. + +Run the following command in the solution root directory: + +```powershell +.\run-dev.ps1 +``` + #### Generating a Signing Certificate In the production environment, you need to use a production signing certificate. ABP Framework sets up signing and encryption certificates in your application and expects an `openiddict.pfx` file in your application. diff --git a/run-dev.ps1 b/run-dev.ps1 new file mode 100644 index 0000000..4f6c52d --- /dev/null +++ b/run-dev.ps1 @@ -0,0 +1,19 @@ +$ScriptPath = Split-Path -Parent $MyInvocation.MyCommand.Definition +Set-Location $ScriptPath + +Write-Host "Starting Back-end (HttpApi.Host)..." -ForegroundColor Green +# Start backend in a new window +Start-Process powershell -ArgumentList '-NoExit', '-Command', 'dotnet run --project "src/Hua.Abp.Demo.HttpApi.Host/Hua.Abp.Demo.HttpApi.Host.csproj"' + +Write-Host "Starting Front-end (Angular)..." -ForegroundColor Green +Set-Location "$ScriptPath/angular" + +# Start frontend in a new window using existing script if available +if (Test-Path "start.ps1") { + Start-Process powershell -ArgumentList '-NoExit', '-File', ".\start.ps1" +} else { + Start-Process powershell -ArgumentList '-NoExit', '-Command', "yarn; yarn start" +} + +Set-Location $ScriptPath +Write-Host "🚀 Services are starting in new windows..." -ForegroundColor Cyan