dioxus-letter-werefox-cafe/README.md

61 lines
1.2 KiB
Markdown
Raw Normal View History

# Dioxus (& Rocket) - [letter.werefox.cafe](https://letter.werefox.cafe)
2023-03-28 08:21:31 -05:00
> A re-implementation of the Valentine's Day site I made, but using Rust's [Dioxus](https://dioxuslabs.com/) crate and [Rocket](https://rocket.rs/) crate.
2023-03-28 08:21:31 -05:00
## Usage
### Just build
2023-03-28 08:21:31 -05:00
```
cargo build
2023-03-28 08:21:31 -05:00
```
### Start a `dev-server` for the project:
```
cargo run
2023-03-28 08:21:31 -05:00
```
### Package this project:
```
cargo build --release
```
## Ignore This Section
> **TODO:** Make subcrates for Dioxus and Rocket, should enable dev server for Dioxus while maintaining overall compatibility.
2023-03-28 08:21:31 -05:00
(or, I personally use the following since port `8080` is usually being used and I want hot reloading)
```
dioxus serve --hot-reload --port 8234
```
## Docker
You can run this in a container using the included `Dockerfile`.
```
docker build -t letter-werefox-cafe .
docker run -p 3469 -d -t letter-werefox-cafe
```
Or, run through docker compose.
```
docker compose up --build -d
```
2023-03-28 08:21:31 -05:00
## Project Structure
```
.project
- public # save the assets you want include in your project.
- src # put your code
- - utils # save some public function
- - data # text files that will be read to for data in the app
2023-03-28 08:21:31 -05:00
- - components # save some custom components
- - templates # put template files here, right now just using handlebar
2023-03-28 08:21:31 -05:00
```