Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucifer1004/dioxus-vercel-demo
Deploy dioxus-web to Vercel.
https://github.com/lucifer1004/dioxus-vercel-demo
dioxus vercel
Last synced: about 1 month ago
JSON representation
Deploy dioxus-web to Vercel.
- Host: GitHub
- URL: https://github.com/lucifer1004/dioxus-vercel-demo
- Owner: lucifer1004
- Created: 2022-01-04T12:50:52.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T02:44:53.000Z (about 1 year ago)
- Last Synced: 2024-06-11T19:49:16.852Z (7 months ago)
- Topics: dioxus, vercel
- Language: Rust
- Homepage: https://dioxus-demo.gabriel-wu.com
- Size: 14.6 KB
- Stars: 23
- Watchers: 4
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dioxus demo
This demo shows how to use [Dioxus](https://github.com/DioxusLabs/dioxus) to build a static web application and deploy it to Vercel.
## Local development
To run the demo locally, you would need the Rust toolchain and `trunk` installed.
Then you can simply run:
```bash
trunk serve
```And you can visit the demo at `http://localhost:8080` (or aother port if you have specified some using `trunk serve --port `).
## Build for production
To build for production, you can simply run:
```bash
trunk build --release
```The default output path is `./dist`.
## Deploy to Vercel
To deploy the application to vercel, you would need to first run `vercel` locally to get the `PROJECT_ID` and `ORG_ID` from the generated `./vercel/project.json` file.
Then you need to set up the following secrets in your GitHub repo:
- `PROJECT_ID`
- `ORG_ID`
- `VERCEL_TOKEN`You can modify `vercel.json` to specify your alias.
Then you can deploy the application to Vercel via your GitHub workflow.