You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,12 @@ Then you can visit `http://[::1]:8080/foo-bar` in the browser and see
58
58
the path you're visiting is "/foo-bar"
59
59
```
60
60
61
+
By default, the server will be bound only to the localhost interface (::1) for security reasons. If you want to access your server over an external network, you'll need to change the bind interface to all addresses:
62
+
63
+
```Swift
64
+
let server =DefaultHTTPServer(eventLoop: loop, interface: "::", port: 8080)
65
+
```
66
+
61
67
## Async Event Loop
62
68
63
69
To use the async event loop, you can get it via key `embassy.event_loop` in `environ` dictionary and cast it to `EventLoop`. For example, you can create an SWSGI app which delays `sendBody` call like this
0 commit comments