docs: update README with /wake/:name request example
This commit is contained in:
10
README.md
10
README.md
@@ -6,8 +6,11 @@ Wake-on-LAN API in Node.js
|
|||||||
1. `npm install`
|
1. `npm install`
|
||||||
2. `npm run start`
|
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`
|
### POST to `/wake`
|
||||||
```bash
|
```bash
|
||||||
curl -X POST -H "Content-Type: application/json" -d '{
|
curl -X POST -H "Content-Type: application/json" -d '{
|
||||||
@@ -18,4 +21,9 @@ curl -X POST -H "Content-Type: application/json" -d '{
|
|||||||
### GET to `/wake`
|
### GET to `/wake`
|
||||||
```bash
|
```bash
|
||||||
curl http://localhost:9999/wake?mac=00:AA:BB:CC:DD:EE
|
curl http://localhost:9999/wake?mac=00:AA:BB:CC:DD:EE
|
||||||
|
```
|
||||||
|
|
||||||
|
### GET to `/wake/:name`
|
||||||
|
```bash
|
||||||
|
curl http://localhost:9999/wake/<target name>
|
||||||
```
|
```
|
||||||
Reference in New Issue
Block a user