docs: Add basic readme
This commit is contained in:
parent
a1b7df01d6
commit
ea91d4cf04
1 changed files with 45 additions and 0 deletions
45
README.md
Normal file
45
README.md
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
# Queen
|
||||||
|
|
||||||
|
## Setting up dev environment
|
||||||
|
|
||||||
|
Copy the `.env.example` to `.env` then fill in missing variables:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cp .env.example .env
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `sqlx-cli` (install using `cargo install sqlx-cli`) to create and migrate the database:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
sqlx db create ; sqlx migrate run
|
||||||
|
```
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
Run the server for development:
|
||||||
|
|
||||||
|
```
|
||||||
|
cargo run
|
||||||
|
```
|
||||||
|
|
||||||
|
The assets used in Queen come from forgejo,
|
||||||
|
so you can use a local Caddyfile to serve both forgejo and `queen`
|
||||||
|
(assuming that forgejo is running on localhost:3000):
|
||||||
|
|
||||||
|
```
|
||||||
|
{
|
||||||
|
http_port 9000
|
||||||
|
}
|
||||||
|
|
||||||
|
localhost:9000 {
|
||||||
|
reverse_proxy /signup* localhost:4008
|
||||||
|
reverse_proxy /payment_success* localhost:4008
|
||||||
|
reverse_proxy localhost:3000
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Run caddy with:
|
||||||
|
|
||||||
|
```
|
||||||
|
caddy run --config Caddyfile
|
||||||
|
```
|
Loading…
Reference in a new issue