Commit Graph
6 Commits
Author SHA1 Message Date
Ben Sully ead183dd2c Add minimal proxy capabilities to dioxus serve
This adds an MVP of some proxying capabilities to the `dioxus serve`
server. The config is similar to that of `trunk serve`: the user can
specify one or more proxy backends under `[[web.proxy]]` in Dioxus.toml,
and the server will intercept requests targeted at the _path_ of that
configured backend and forward them to the backend server.

Example
-------

For example, if the dev server is serving on port 8080 with this config:

```
[[web.proxy]]
backend = "http://localhost:9000/api"
```

then requests to http://localhost:8080/api,
http://localhost:8080/api/ and http://localhost:8080/api/any-subpath
to be forwarded to the respective paths on http://localhost:9000.

This PR doesn't handle path rewriting or anything yet but it would be
fairly simple to add in future if anyone needs it.
2023-02-27 10:44:32 +00:00
trevyn 9152e00fab Return non-zero exit code on error 2022-08-27 11:18:44 +04:00
Joshua Kifer 49a451c707 Include missing error text in some errors 2022-03-25 07:54:18 -06:00
Aster ce628e1197 Fix compiler errors 2022-02-09 16:11:02 +08:00
Jonathan Kelley 5fdb14446b wip: studio upgrades 2021-12-29 12:03:18 -05:00
Jonathan Kelley aebf6678a8 wip: move out of dioxus main 2021-07-07 16:54:14 -04:00