docs(README): add example usage of main web page and /targets endpoint

This commit is contained in:
2026-01-28 03:01:04 +01:00
parent 95d0e3eb74
commit 67daf00f04

View File

@@ -11,6 +11,10 @@ Wake-on-LAN API in Node.js
2. Edit the file and add your targets
## Usage
Navigate to `http://localhost:9999` and just click the target you want to wake up.
Or:
### POST to `/wake`
```bash
curl -X POST -H "Content-Type: application/json" -d '{
@@ -23,6 +27,11 @@ curl -X POST -H "Content-Type: application/json" -d '{
curl http://localhost:9999/wake?mac=00:AA:BB:CC:DD:EE
```
### GET to `/targets`
```bash
curl http://localhost:9999/targets
```
### GET to `/wake/:name`
```bash
curl http://localhost:9999/wake/<target name>