Commit graph

112 commits

Author SHA1 Message Date
Luca Palmieri
757bdf9330
Update README.md 2020-09-27 17:17:34 +01:00
Luca Palmieri
2fe0da12f3
Update README.md 2020-09-27 17:13:25 +01:00
Luca Palmieri
3e553eaf60
Chapter04 (#9)
* Add chapter 4 code.

* Add logger middleware.

* Add env_logger.

* Instrumented.

* Test logs.

* Introduce instrument.

* Refactor handler.

* Use TracingLogger.

* Update.

* Fix linter error.
2020-09-27 17:09:42 +01:00
Luca Palmieri
3e01540d57 Make sure to match the state of the tests folder at the end of chapter 3 2020-09-21 13:50:01 +01:00
Jes Bak Hansen
f4ba849d91
Bind to all interfaces (#5)
* Bind to all interfaces

When running under WSL2, binding only to localhost via the 127.0.0.1 address
only lets you access the server from within WSL2 itself. It does not allow you
to access the server from Windows.

With this change, you can access the web server from the WSL ip address. You can
find your WSL ip address with

```
$ ip a | grep eth0
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    inet 192.168.161.12/20 brd 192.168.175.255 scope global eth0
```

* Add comment about binding to localhost

When running under WSL2, binding only to localhost via the 127.0.0.1 address
only lets you access the server from within WSL2 itself. It does not allow you
to access the server from Windows.

Add a comment explaining how to work around this, by binding to all
interfaces, instead of only to localhost.
2020-09-01 15:54:53 +01:00
Luca Palmieri
24dccda00c
Chapter 3 Part 1 - Patches (#4)
* Adjust content encoding.

* Refactor assertion.

* Add one more test case

* Fix assertions.

* Fix route.

* Stricter assertions

* Few fixes.

* Formatting
2020-08-31 02:05:21 +01:00
Luca Palmieri
656ee46c09
Chapter03, Part 1 (#2) 2020-08-25 22:19:53 +01:00
LukeMathWalker
56fb23e058 Fix Cargo.toml file. 2020-08-23 12:41:41 +01:00
LukeMathWalker
ba38b61449 Add CI. 2020-08-23 12:00:32 +01:00
LukeMathWalker
4959ed05a9 Fix code fences. 2020-08-23 11:56:30 +01:00
LukeMathWalker
8f86c3bccf Populate Chapter3 (Part0) 2020-08-23 11:53:08 +01:00
LukeMathWalker
7e63ca87bd Scaffolding 2020-08-23 11:34:29 +01:00