Skip to content

Code template for a production Web Application using Axum: The AwesomeApp Blueprint for Professional Web Development.

License

Notifications You must be signed in to change notification settings

sandro-sole/rust-web-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust10x Web App Blueprint for Production Coding

More info at: https://rust10x.com/web-app

Rust10x Web App YouTube Videos:

Starting the DB

# Start postgresql server docker image:
docker run --rm --name pg -p 5432:5432 \
   -e POSTGRES_PASSWORD=welcome \
   postgres:15

# (optional) To have a psql terminal on pg. 
# In another terminal (tab) run psql:
docker exec -it -u postgres pg psql

# (optional) For pg to print all sql statements.
# In psql command line started above.
ALTER DATABASE postgres SET log_statement = 'all';

Dev (watch)

NOTE: Install cargo watch with cargo install cargo-watch.

# Terminal 1 - To run the server.
cargo watch -q -c -w src/ -w .cargo/ -x "run"

# Terminal 2 - To run the quick_dev.
cargo watch -q -c -w examples/ -x "run --example quick_dev"

Unit Test (watch)

cargo watch -q -c -x "test -- --nocapture"

# Specific test with filter.
cargo watch -q -c -x "test model::task::tests::test_create -- --nocapture"

Dev

# Terminal 1 - To run the server.
cargo run

# Terminal 2 - To run the tests.
cargo run --example quick_dev

Unit Test

cargo test -- --nocapture

cargo watch -q -c -x test model::task::tests::test_create -- --nocapture


More resources for Rust for Production Coding

This repo on GitHub

About

Code template for a production Web Application using Axum: The AwesomeApp Blueprint for Professional Web Development.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 99.3%
  • HTML 0.7%