Skip to content

nathanielDuro/RUST-TODO

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Credits to https://github.com/jeremychone-channel/rust-todomvc

I did not pull or fork the github repo, because I wanted to follow his youtube video tutorials, and wanted to learn more and understand Rust Development and concurrency programming.

YouTube tutorials:

Part 1 (database / model access) - https://youtu.be/VIig9IcQ-w8 Part 2 (web / warp filters) - https://youtu.be/plKzUo8F6Mg Part 3 (frontend / #FrameworkLess) - https://youtu.be/DkR0tCBPqYc

Run the example

# Terminal 1 - start postgresql
docker run --rm -p 5432:5432 -e "POSTGRES_PASSWORD=postgres" --name pg postgres:14

# Terminal 2 - build frontend
cd frontend
npm run build

# Terminal 3 - build backend
cd backend
cargo run -- ../frontend/web-folder
  • Those terminals can be part of the VSCode terminals
  • Watch commands below for live development

Dev Test

# Test for model
cargo watch -q -c -w src/ -x 'test model_ -- --test-threads=1 --nocapture'

# Test for web
cargo watch -q -c -w src/ -x 'test web_ -- --test-threads=1 --nocapture'

Live Dev

# Terminal 1 - build & watch the backend code
cd backend
cargo watch -q -c -w src/ -x 'run -- ../frontend/web-folder'

# Terminal 2 - build & watch the frontend
cd frontend
npm build -- -w

DB

# Start the database
docker run --rm -p 5432:5432 -e "POSTGRES_PASSWORD=postgres" --name pg postgres:14

# optional psql (other terminal) 
docker exec -it -u postgres pg psql

License - MIT OR Apache-2.0

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published