-
Configure and setup
diesel
(see bellow). -
Add
PORT
andHOST
to the.env.local
file# .env.local PORT=8080 HOST="localhost"
-
If you want to secure the connection, you can activate de
secured
flag. You will need to addKEY
(32 randoom characters) andNONCE
(12 random characters) to yourenv.local
:# .env.local PORT=8080 HOST="localhost" KEY="azertyuiopqsdfghjklmwxcvbn123456" NONCE="1234567890AZ"
-
Run the project with
cargo run
.
This guide gives you the minimum to run the project. For more information, see this file.
-
Download the
sqlite3
precompiled binaries:- On Windows: download
sqlite3-dll-win-x64-*.zip
from the sqlite download page. Extract the contents of the.zip
file and add the folder to thePATH
. - On Debian/Ubuntu: run
sudo apt install libsqlite3-dev
- On Fedora/Centos: run
sudo dnf install sqlite-devel
- On Windows: download
-
Install the diesel CLI with
cargo install diesel_cli --no-default-features --features sqlite
-
To create the database, run
diesel setup
-
Open
diesel.toml
and change theprint_schema
path tosrc/database/schema.rs
. -
To perform a migration with the content of the schema, run
diesel migration generate --diff-schema init
-
Update your
.gitignore
file.