Minor Proxy Improvements (#1289)

* fix(serve): provide a clear error with pathless proxy URLs

Without this, `dx serve` panics with this message:

```
Paths must start with a `/`. Use "/" for
 root routes
 ```

 That's not very clear. Instead, we can detect this situation and provide a better error message:

```
Error: 🚫 Serving project failed: Failed to establish proxy: Proxy backend URL must have a non-empty path, e.g. http://localhost:8080/api instead of http://localhost:8080
```

* docs(config): correct format for `web.proxy`
This commit is contained in:
Brian Donovan authored and GitHub committed 2023-08-04 13:44:56 -05:00
1 parent 50230b6f71
commit 6d154b5072
3 files changed
+33 -3

No files matched your search

+1 -1
View File
@@ -144,7 +144,7 @@ Configeration related to static resources your application uses in development:
Configeration related to any proxies your application requires durring development. Proxies will forward requests to a new service
```
[web.proxy]
[[web.proxy]]
# configuration
```