feat: Refactor service management scripts to use a unified dev script
- Added package.json to manage development scripts. - Updated restart-services.ps1 to call the new dev script for starting services. - Refactored start-admin.ps1, start-backend.ps1, start-frontend.ps1, and start-mcp.ps1 to utilize the dev script for starting respective services. - Enhanced stop-services.ps1 to improve process termination logic by matching command patterns.
This commit is contained in:
59
README.md
59
README.md
@@ -16,45 +16,48 @@ Monorepo for the Termi blog system.
|
||||
|
||||
## Run
|
||||
|
||||
### Monorepo scripts
|
||||
### Recommended
|
||||
|
||||
From the repository root:
|
||||
|
||||
```powershell
|
||||
npm run dev
|
||||
```
|
||||
|
||||
This starts `frontend + admin + backend` in a single Windows Terminal window with multiple tabs.
|
||||
|
||||
Common shortcuts:
|
||||
|
||||
```powershell
|
||||
npm run dev:mcp
|
||||
npm run dev:frontend
|
||||
npm run dev:admin
|
||||
npm run dev:backend
|
||||
npm run dev:mcp-only
|
||||
npm run stop
|
||||
npm run restart
|
||||
```
|
||||
|
||||
### PowerShell entrypoint
|
||||
|
||||
If you prefer direct scripts, use the single root entrypoint:
|
||||
|
||||
```powershell
|
||||
.\dev.ps1
|
||||
```
|
||||
|
||||
Frontend + backend + MCP:
|
||||
|
||||
```powershell
|
||||
.\dev.ps1 -WithMcp
|
||||
.\dev.ps1 -Only frontend
|
||||
.\dev.ps1 -Only admin
|
||||
.\dev.ps1 -Only backend
|
||||
.\dev.ps1 -Only mcp
|
||||
```
|
||||
|
||||
Only frontend:
|
||||
If you want a single service to be opened as a new Windows Terminal tab instead of running in the current shell:
|
||||
|
||||
```powershell
|
||||
.\dev.ps1 -FrontendOnly
|
||||
.\dev.ps1 -Only frontend -Spawn
|
||||
```
|
||||
|
||||
Only backend:
|
||||
|
||||
```powershell
|
||||
.\dev.ps1 -BackendOnly
|
||||
```
|
||||
|
||||
Only admin:
|
||||
|
||||
```powershell
|
||||
.\dev.ps1 -AdminOnly
|
||||
```
|
||||
|
||||
Only MCP:
|
||||
|
||||
```powershell
|
||||
.\dev.ps1 -McpOnly
|
||||
```
|
||||
|
||||
Direct scripts:
|
||||
Legacy aliases are still available and now just forward to `dev.ps1`:
|
||||
|
||||
```powershell
|
||||
.\start-frontend.ps1
|
||||
@@ -90,7 +93,7 @@ cargo loco start 2>&1
|
||||
### MCP Server
|
||||
|
||||
```powershell
|
||||
.\start-mcp.ps1
|
||||
.\dev.ps1 -Only mcp
|
||||
```
|
||||
|
||||
Default MCP endpoint:
|
||||
|
||||
Reference in New Issue
Block a user