docs: update README with /wake/:name request example

This commit is contained in:
2026-01-28 02:02:26 +01:00
parent 6d39c4b8e9
commit c917fd739a

View File

@@ -6,8 +6,11 @@ Wake-on-LAN API in Node.js
1. `npm install`
2. `npm run start`
## Usage
## Custom targets
1. Copy `targets.example.json` to `targets.json`
2. Edit the file and add your targets
## Usage
### POST to `/wake`
```bash
curl -X POST -H "Content-Type: application/json" -d '{
@@ -19,3 +22,8 @@ curl -X POST -H "Content-Type: application/json" -d '{
```bash
curl http://localhost:9999/wake?mac=00:AA:BB:CC:DD:EE
```
### GET to `/wake/:name`
```bash
curl http://localhost:9999/wake/<target name>
```