Skip to content

Commit 712c570

Browse files
committed
Updated docs to use port 5000
1 parent e49a5ed commit 712c570

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/examples.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ Although there is nothing wrong with this approach, from the version 8.0.0 of Ci
2727
`it is possible to use the environment variables <https://docs.circuitpython.org/en/latest/docs/environment.html#circuitpython-behavior>`_
2828
defined in ``settings.toml`` file to store secrets and configure the WiFi network.
2929

30+
By default the library uses ``0.0.0.0`` and port ``5000`` for the server, as port ``80`` is reserved for the CircuitPython Web Workflow.
31+
If you want to use port ``80`` , you need to set ``CIRCUITPY_WEB_API_PORT`` to any other port, and then set ``port`` parameter in ``Server`` constructor to ``80`` .
32+
3033
This is the same example as above, but it uses the ``settings.toml`` file to configure the WiFi network.
3134

3235
**From now on, all the examples will use the** ``settings.toml`` **file to configure the WiFi network.**
@@ -412,7 +415,7 @@ occurs during handling of the request in ``.serve_forever()``.
412415

413416
This is how the logs might look like when debug mode is enabled::
414417

415-
Started development server on http://192.168.0.100:80
418+
Started development server on http://192.168.0.100:5000
416419
192.168.0.101 -- "GET /" 194 -- "200 OK" 154 -- 96ms
417420
192.168.0.101 -- "GET /example" 134 -- "404 Not Found" 172 -- 123ms
418421
192.168.0.102 -- "POST /api" 1241 -- "401 Unauthorized" 95 -- 64ms

examples/httpserver_mdns.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
mdns_server = mdns.Server(wifi.radio)
1313
mdns_server.hostname = "custom-mdns-hostname"
14-
mdns_server.advertise_service(service_type="_http", protocol="_tcp", port=80)
14+
mdns_server.advertise_service(service_type="_http", protocol="_tcp", port=5000)
1515

1616
pool = socketpool.SocketPool(wifi.radio)
1717
server = Server(pool, "/static", debug=True)

0 commit comments

Comments
 (0)