A Rust application that interacts with an MsSql database and displays the data on a web page.
This project demonstrates a simple Rust application that connects to an MsSql database, queries a table, and presents the information on a web page.
The application consists of a basic web server built with the actix-web crate. Database interactions are handled using the tiberius crate. The web page displays a list of products retrieved from the database.
Application Architecture
Before you begin, ensure you have the following installed:
- Rust and Cargo
- An MsSql database instance
- Configure Database Connection:
- Locate the
.envfile in the project root. - Modify the database connection string to point to your MsSql instance.
- Locate the
- Database Schema and Data:
- The SQL script
script.sqlcontains the necessary commands to create theproductstable and populate it with sample data. - Execute this script in your MsSql database.
- The SQL script
- Open your terminal in the project's root directory.
- Run the application using the command:
cargo run
- Open your web browser and navigate to
http://localhost:8080to view the product list.
Web page displaying product list
- Rust
actix-web(for the web server)tiberius(for MsSql database connection)- HTML (for rendering the web page)

