Skip to content

Commit 6b78b85

Browse files
committed
2 parents 6990902 + 1303996 commit 6b78b85

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

README.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -139,54 +139,58 @@ $ busylight --all off # turn all lights off
139139
First start the `busylight` API server using the `busyserv` command line interface:
140140
```console
141141
$ busyserve -D
142-
INFO: Started server process [20189]
142+
INFO: Started server process [40064]
143143
INFO: Waiting for application startup.
144144
INFO: Application startup complete.
145-
INFO: Uvicorn running on http://0.0.0.0:8888 (Press CTRL+C to quit)
145+
INFO: Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
146+
...
146147
```
147148

148-
The API is fully documented and available @ `https://localhost:8888/redoc`
149+
The API is fully documented and available via these URLs:
150+
151+
- `https://localhost:8000/redoc`
152+
- `https://localhost:8000/docs`
149153

150154

151155
Now you can use the web API endpoints which return JSON payloads:
152156

153157
```console
154-
$ curl -s http://localhost:8888/lights/status | jq
158+
$ curl -s http://localhost:8000/lights/status | jq
155159
...
156-
$ curl -s http://localhost:8888/light/0/status | jq
160+
$ curl -s http://localhost:8000/light/0/status | jq
157161
...
158-
$ curl -s http://localhost:8888/light/0/on | jq
162+
$ curl -s http://localhost:8000/light/0/on | jq
159163
{
160164
"light_id": 0,
161165
"action": "on",
162166
"color": "green",
163167
"rgb": [0, 128, 0]
164168
}
165-
$ curl -s http://localhost:8888/light/0/off | jq
169+
$ curl -s http://localhost:8000/light/0/off | jq
166170
{
167171
"light_id": 0,
168172
"action": "off"
169173
}
170-
$ curl -s http://localhost:8888/light/0/on?color=purple | jq
174+
$ curl -s http://localhost:8000/light/0/on?color=purple | jq
171175
{
172176
"light_id": 0,
173177
"action": "on",
174178
"color": "purple",
175179
"rgb": [128, 0, 128]
176180
}
177-
$ curl -s http://localhost:8888/lights/on | jq
181+
$ curl -s http://localhost:8000/lights/on | jq
178182
{
179183
"light_id": "all",
180184
"action": "on",
181185
"color": "green",
182186
"rgb", [0, 128, 0]
183187
}
184-
$ curl -s http://localhost:8888/lights/off | jq
188+
$ curl -s http://localhost:8000/lights/off | jq
185189
{
186190
"light_id": "all",
187191
"action": "off"
188192
}
189-
$ curl -s http://localhost:8888/lights/rainbow | jq
193+
$ curl -s http://localhost:8000/lights/rainbow | jq
190194
{
191195
"light_id": "all",
192196
"action": "effect",

0 commit comments

Comments
 (0)