No description
Find a file
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
.fleet feat: default plugin info 2022-11-03 00:30:47 -07:00
.github/workflows fix: docs workflow 2022-12-01 09:17:03 -08:00
.vscode feat: commit codee 2022-07-28 23:07:55 +08:00
docs Add minimal proxy capabilities to dioxus serve 2023-02-27 10:44:32 +00:00
examples feat: commit code 2022-07-26 14:25:59 +08:00
extension wip: more tweaks 2022-11-14 18:09:09 -08:00
src Add minimal proxy capabilities to dioxus serve 2023-02-27 10:44:32 +00:00
tests removed dead code 2023-01-19 11:36:03 -05:00
.gitignore Merge branch 'master' into jk/formatting-and-extension 2022-12-25 23:38:33 -05:00
build.rs feat: use local bundle strategy 2022-07-06 00:45:22 -04:00
Cargo.lock Add minimal proxy capabilities to dioxus serve 2023-02-27 10:44:32 +00:00
Cargo.toml Add minimal proxy capabilities to dioxus serve 2023-02-27 10:44:32 +00:00
Dioxus.toml feat: commit code 2022-03-15 00:22:41 +08:00
README.md started tests; some minor build optimization 2023-01-19 10:18:36 -05:00
rustfmt.toml update edition 2022-06-12 03:31:13 -04:00

📦 Dioxus CLI

Tooling to supercharge Dioxus projects

**dioxus-cli** (inspired by wasm-pack and webpack) is a tool for getting Dioxus projects up and running. It handles all build, bundling, development and publishing to simplify web development.

Installation

Install stable version

cargo install dioxus-cli

Install from git repository

cargo install --git https://github.com/DioxusLabs/cli

Install from local folder

cargo install --path . --debug

Get Started

Use dioxus create project-name to initialize a new Dioxus project.

It will be cloned from the dioxus-template repository.


Alternatively, you can specify the template path:

dioxus create hello --template gh:dioxuslabs/dioxus-template

Dioxus Config File

Dioxus CLI will use Dioxus.toml file to Identify some project info and switch some cli feature.

You can get more configure information from Dioxus CLI Document.