This boilerplate project provides a foundation for developing a database-driven application using Rust.
- Asynchronous database connections with
sqlx - Basic user model to kickstart development
- Modular design for easy expansion
Follow these steps to get your project up and running:
- Clone the repository:
git clone https://github.com/yourusername/rust-database-boilerplate.git cd rust-database-boilerplate - Update dependencies:
Review the
Cargo.tomlfile to add any additional dependencies required for your project. - Configure your database:
Open the
src/main.rsfile and set up your database configurations, including connection strings and any environment variables. - Run the project:
Use the following command to build and run the application:
cargo run
- Ensure you have Rust and Cargo installed on your machine. If not, visit rust-lang.org for installation instructions.
- You may need to set up your database server before running the application. Refer to the documentation for your specific database for setup guidelines.