Skip to content

Commit

Permalink
brief outline of dns module in README
Browse files Browse the repository at this point in the history
  • Loading branch information
jon committed Aug 1, 2022
1 parent 411e399 commit bb3deed
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ using the [Raspberry Pi Pico W](https://shop.pimoroni.com/products/raspberry-pi-
- [What **phew!** does](#what-phew-does)
- [Basic example](#basic-example)
- [Function reference](#function-reference)
- [server](#server)
- [server module](#server_module)
- [add_route](#add_route)
- [set_catchall](#set_catchall)
- [run](#run)
Expand All @@ -27,6 +27,8 @@ using the [Raspberry Pi Pico W](https://shop.pimoroni.com/products/raspberry-pi-
- [Variables](#variables)
- [Conditional display](#conditional-display)
- [Includes](#includes)
- [dns module](#dns_module)
- [run_catchall](#run_catchall)

## What **phew!** does:

Expand Down Expand Up @@ -78,7 +80,7 @@ assuming the correctness of incoming requests.

## Function reference

### server
### server module

The `server` module provides all functionality for running a web server with
route handlers.
Expand Down Expand Up @@ -313,4 +315,18 @@ Hello there {{name}}!
</body>
```

:warning: Note: you need to explicitly pass through template parameters into the included template - they are not available by default.
:warning: Note: you need to explicitly pass through template parameters into the included template - they are not available by default.

### dns module

To make implementing device provisioning interfaces (via captive portal) simple **phew!** provides a catchall DNS server.

If you put the Pico W into access point mode and then run the catchall DNS server it will route all DNS requests back to the local device so that they can be handled.

#### run_catchall

```python
dns.run_catchall(ip_address)
```

Pass in the IP address of your device once in access point mode.

0 comments on commit bb3deed

Please sign in to comment.