fix: correct port

This commit is contained in:
2025-10-21 22:56:11 +02:00
parent 986745d8c8
commit 4a11bad7dd

View File

@@ -33,13 +33,13 @@ go mod download
go run main.go go run main.go
``` ```
The server will start on port 8080 by default (or use `PORT` environment variable to change it). The server will start on port 3002 by default (or use `PORT` environment variable to change it).
## API Endpoints ## API Endpoints
### Upload Firmware ### Upload Firmware
```bash ```bash
curl -X POST http://localhost:8080/firmware \ curl -X POST http://localhost:3002/firmware \
-F "metadata={\"name\":\"base\",\"version\":\"1.0.0\",\"labels\":{\"app\":\"base\"}}" \ -F "metadata={\"name\":\"base\",\"version\":\"1.0.0\",\"labels\":{\"app\":\"base\"}}" \
-F "firmware=@firmware.bin" -F "firmware=@firmware.bin"
``` ```
@@ -47,23 +47,23 @@ curl -X POST http://localhost:8080/firmware \
### List Firmware ### List Firmware
```bash ```bash
# Get all firmware # Get all firmware
curl http://localhost:8080/firmware curl http://localhost:3002/firmware
# Filter by name # Filter by name
curl "http://localhost:8080/firmware?name=base" curl "http://localhost:3002/firmware?name=base"
# Filter by version # Filter by version
curl "http://localhost:8080/firmware?version=1.0.0" curl "http://localhost:3002/firmware?version=1.0.0"
``` ```
### Download Firmware ### Download Firmware
```bash ```bash
curl http://localhost:8080/firmware/base/1.0.0 -o firmware.bin curl http://localhost:3002/firmware/base/1.0.0 -o firmware.bin
``` ```
### Health Check ### Health Check
```bash ```bash
curl http://localhost:8080/health curl http://localhost:3002/health
``` ```
## Storage Structure ## Storage Structure
@@ -84,7 +84,7 @@ registry/
## Configuration ## Configuration
The registry uses the following environment variables: The registry uses the following environment variables:
- `PORT`: Server port (default: 8080) - `PORT`: Server port (default: 3002)
## Database Schema ## Database Schema