-
Install Rust
-
Install
trunk
,sea-orm-cli
,cargo-edit
andcargo-watch
with cargocargo install trunk sea-orm-cli cargo-edit cargo-watch
-
Install WASM target with rustup
rustup target add wasm32-unknown-unknown
-
Copy
.env.example
to.env
and editDATABASE_URL
accordingly. During development, it's easier to use the MySQL container indocker-mysql/
.If using the development database, you might need to create a database on MySQL (e.g.
DATABASE CREATE frigu;
). -
Run pending database migrations
sea-orm-cli migrate up -d ./server/migration
-
Run
dev.sh
to start dev server
To create a user account, you can send the following request from a loopback interface (i.e. localhost):
curl -X POST 'http://localhost:8080/api/register' \
-H "Content-Type: application/json" \
-d '{"name": "John Doe", "phone_number": "912345678", "password": "secret"}'
A pre-built docker image is available at ghcr.io/diogotcorreia/frigu
.
A sample docker-compose.yml
for this project is available in this repository.