Skip to content

Commit 38262e9

Browse files
authored
Fix WiFi example
1 parent ebd147b commit 38262e9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/index.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ srv:listen(80, function(conn)
2121
end)
2222
```
2323
```lua
24-
-- connect to WiFi access point
24+
-- connect to WiFi access point (DO NOT save config to flash)
2525
wifi.setmode(wifi.STATION)
26-
wifi.sta.config("SSID", "password")
26+
station_cfg={}
27+
station_cfg.ssid = "SSID"
28+
station_cfg.pwd = "password"
29+
station_cfg.save = false
30+
wifi.sta.config(station_cfg)
2731
```
2832

2933
```lua

0 commit comments

Comments
 (0)