fix start and install bat

This commit is contained in:
larssand
2026-08-24 18:29:39 +02:00
parent aa74da0bdf
commit 8b7153bf6a
8 changed files with 89 additions and 59 deletions

View File

@@ -359,31 +359,32 @@ Use 64-bit Windows 11 and Node.js 22 or 24 LTS. The easiest supported setup is:
1. Clone or extract the complete repository, preferably to `C:\\Live_RC`.
2. Double-click `windows\\install.bat`.
3. Start with `windows\\start_backend.bat` or `npm start`.
3. The installer runs `npm.cmd restart` and leaves the backend running.
4. Open `http://localhost:8081`.
The setup script can install Node.js LTS through `winget`, runs locked dependency installation with `npm ci`, verifies SQLite/Express, and checks the bundled AMMC runtime. Full instructions and troubleshooting: [`windows/README.md`](windows/README.md).
The setup script can install Node.js LTS through `winget`, runs locked dependency installation with `npm.cmd ci`, verifies SQLite/Express, and checks the bundled AMMC runtime. Full instructions and troubleshooting: [`windows/README.md`](windows/README.md).
Common commands:
```powershell
npm start
npm stop
npm restart
npm run status
npm run start:fg
npm.cmd start
npm.cmd stop
npm.cmd restart
npm.cmd run status
npm.cmd run start:fg
```
- `npm start` starts the backend in the background
- `npm stop` stops the process via `data/server.pid`
- `npm restart` restarts the backend
- `npm run status` shows whether the backend is running
- `npm run start:fg` runs in foreground for troubleshooting
- `npm.cmd start` starts the backend in the background
- `npm.cmd stop` stops the process via `data/server.pid`
- `npm.cmd restart` restarts the backend
- `npm.cmd run status` shows whether the backend is running
- `npm.cmd run start:fg` runs in foreground for troubleshooting
### Windows scripts
The `windows/` folder includes:
- `windows\\install.bat` installs and verifies Node/npm dependencies
- `windows\\install.bat` installs dependencies and runs `npm.cmd restart`
- `windows\\start_ammc.bat` starts AMMC in the background
- `windows\\start_backend.bat` starts `npm start` in the background
- `windows\\start_backend.bat` starts `npm.cmd start` in the background
- `windows\\restart_backend.bat` runs `npm.cmd restart` after updates
- `windows\\start_all.bat` starts both AMMC + backend and opens the web page
- `windows\\stop_all.bat` stops the managed backend and `ammc-amb.exe`
@@ -399,7 +400,7 @@ There are two supported modes.
### A. Managed AMMC from the web UI
Important:
- AMMC runs on the same host where `npm start` / `node server.js` runs
- AMMC runs on the same host where the backend was started with `npm.cmd start`
- if you only browse from another laptop, no process starts there
- the `AMMC executable` field in `Settings` is a path on the backend host, not the client browser machine
@@ -436,7 +437,7 @@ sudo ufw allow 8081/tcp
## Auto reload during development
- The server watches `index.html`, `src/app.js`, and `src/styles.css`
- When files in `Live_RC` change, the client reloads automatically
- If backend code changes, run `npm restart`
- If backend code changes on Windows, run `npm.cmd restart`
## Verify SQLite persistence
Latest passings via API: