Backend for encapsulate mobile app
To run this, you need rust and cargo
Install both with:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
https://www.rust-lang.org/tools/install
To run the app:
cargo run
DB and migrations:
Need a posgtres db
Run with docker:
docker run --name postgresql-container -p 5555:5432 -e POSTGRES_PASSWORD=pass -d postgres
Then create a .env file in root with the following env vars:
DATABASE_URL=postgres://postgres:pass@localhost:5555/encapsulate
For migrations, need diesel-cli: https://diesel.rs/guides/getting-started
cargo install diesel_cli --no-default-features --features postgres
diesel setup
diesel migration run