The backend and database server for All In One Compute App.
-
Install nightly toolchain
rustup install nightly
-
Install diesel_cli
cargo install diesel_cli --no-default-features --features mysql
-
Install a mysql database server (mariadb recommended)
-
Create database named
aioc
CREATE DATABASE aioc;
-
Generate Secret Key
This backend requires a secret key to be generated for generating,encoding and decoding jwt tokens.
head -c16 /dev/urandom > secret.key
-
Environment Variables
DATABASE_URL must exported for diesel framework.
echo DATABASE_URL=mysql://username:password@localhost/aioc > .env
Replace username and password with your database configurations.
-
Migrations
Use diesel_clie in order to create tables and relations.
diesel migration run
The nightly compiler must be used to compile the backend.Set it as default toolchain.
rustup override set nightly
-
Debug builds
cargo build
-
Release builds
cargo build --release