Todo list cli app build with Rust
- Make sure you have Postgres running.
- Make sure you have installed
diesel-cli
. This project is using posgresql as the main DBcargo install diesel_cli --no-default-features --features postgres
Notes:
Sometimes you need to installlibpq
for supporting postgres backend - Creating
.env
file. reference:.env.example
- Set
DATABASE_URL
in the.env
file. - Initialize diesel using:
diesel setup
. - Run the migration using:
diesel migration run
.
- Install dependency and build app using cargo
cargo build --release
- Create a copy or link to
target/release/rustodo
. I prefer using symlink.ln -s target/release/rustodo rustodo
- Run the app
# Run interactively using: ./rustodo # Or ./rustodo add "Create new todo list api" "Testing todo list app" ./rustodo list