Skip to content

Commit 41a7f18

Browse files
committed
blink1-tiny-server update readme
1 parent d9b5180 commit 41a7f18

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

server/README.md

+13-8
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,38 @@ Use:
1818
```
1919
./blink1-tiny-server -p 8000
2020
```
21-
Or to serve the blink(1) URL API examples:
21+
By default the HTML API examples are built-in and served. To try them out,
22+
open a browser to: http://localhost:8000/
23+
24+
To disable the HTML examples, use:
2225
```
23-
./blink1-tiny-server -p 8000 -d ./server/html
26+
./blink1-tiny-server -p 8000 -no-html
2427
```
25-
And then in a browser visit: http://localhost:8000/
26-
27-
Static HTML serving is disabled by default, you must specific `-d docroot` to enable it.
2828

2929
Usage:
3030
```
31-
./blink1-tiny-server --help
31+
% ./blink1-tiny-server --help
3232
Usage:
3333
blink1-tiny-server [options]
3434
where [options] can be:
3535
--port port, -p port port to listen on (default 8000)
36-
--document_root path, -d path path to serve static HTML files
36+
--baseurl url, -U url set baseurl to listen in (default http://localhost:8000)
37+
--no-html do not serve static HTML help
3738
--version version of this program
3839
--help, -h this help page
3940
4041
Supported URIs:
4142
/blink1/ -- simple status page
4243
/blink1/id -- get blink1 serial number
4344
/blink1/on -- turn blink(1) full bright white
45+
/blink1/off -- turn blink(1) dark
4446
/blink1/red -- turn blink(1) solid red
4547
/blink1/green -- turn blink(1) solid green
4648
/blink1/blue -- turn blink(1) solid blue
47-
/blink1/fadeToRGB -- turn blink(1) specified RGB color
49+
/blink1/cyan -- turn blink(1) solid cyan
50+
/blink1/yellow -- turn blink(1) solid yellow
51+
/blink1/magenta -- turn blink(1) solid magenta
52+
/blink1/fadeToRGB -- turn blink(1) specified RGB color by 'rgb' arg
4853
/blink1/blink -- blink the blink(1) the specified RGB color
4954
/blink1/pattern/play -- play color pattern specified by 'pattern' arg
5055
/blink1/random -- turn the blink(1) a random color

server/blink1-tiny-server.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ void usage()
8787
" %s [options]\n"
8888
"where [options] can be:\n"
8989
" --port port, -p port port to listen on (default %d)\n"
90-
" --baseurl url, -U url set baseurl to listen in (default http://%s:%d)"
90+
" --baseurl url, -U url set baseurl to listen in (default http://%s:%d)\n"
9191
" --no-html do not serve static HTML help\n"
9292
" --version version of this program\n"
9393
" --help, -h this help page\n"

0 commit comments

Comments
 (0)