# salvo-api **Repository Path**: panghongye/salvo-api ## Basic Information - **Project Name**: salvo-api - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-07-30 - **Last Updated**: 2024-07-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Introduction This is a project generated by [salvo-cli](https://github.com/salvo-rs/salvo-cli). You can run the program and test according to the following commands (for non-sqlite databases, please modify the database connection string first according to the tutorial, and complete the initial work of the data). 😄 The latest version of Salvo requires Rust version 1.75. If your compilation fails, please try upgrading with `rustup update`. ``` shell //Run the project cargo run //Run tests cargo test ``` # Tip - If you choose sqlite or have initialized the data in the users table, please use the account zhangsan with password 123 to login. - The database connection string is in config/config.toml, but if you use sqlx or seaorm, the library itself reads the configuration from .env file to generate entities, run migrations, and validate. So when you modify the database connection string, you need to change two places at the same time. # orm doc or home page link 🎯 You have chosen sqlx, documentation can be viewed here:https://github.com/launchbadge/sqlx ## sqlx_cli SQLx's associated command-line utility for managing databases, migrations, and enabling "offline" mode with sqlx::query!() and friends. https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/README.md ## Data initialization You have chosen sqlite database, the database has been initialized in the data folder. # Project directory description # salvo-api - **Dir:** salvo-api - *File:* .env (Database connection string config file) - **Dir:** .github - **Dir:** workflows - *File:* build.yml - **Dir:** assets (Static resources such as images, JavaScript scripts and CSS style sheets) - *File:* favicon.ico - *File:* Cargo.toml (Rust project dependency and configuration info) - *File:* cliff.toml (For generating changelogs with git-cliff) - **Dir:** config (Folder containing all configuration files) - **Dir:** certs - *File:* cert.pem - *File:* key.pem - *File:* config.yml - **Dir:** data (Directory containing database files or initialization data sql files) - *File:* demo.db - *File:* deny.toml (License checks are used to verify that each crate you use has license terms that you consider acceptable.) - **Dir:** migrations (Database migration script storage location) - **Dir:** 2021-10-20-000000_create_users_table - *File:* up.sql - **Dir:** src (Source code directory) - *File:* app_error.rs - *File:* app_writer.rs - *File:* config.rs - *File:* db.rs - **Dir:** dtos - *File:* mod.rs - *File:* user.rs - **Dir:** entities - *File:* mod.rs - *File:* users.rs - *File:* main.rs - **Dir:** middleware - *File:* cors.rs - *File:* handle_404.rs - *File:* jwt.rs - *File:* mod.rs - **Dir:** routers - *File:* demo.rs - *File:* mod.rs - *File:* static_routers.rs - *File:* user.rs - **Dir:** services - *File:* mod.rs - *File:* user.rs - **Dir:** utils - *File:* mod.rs - *File:* rand_utils.rs # cargo-deny ``` shell cargo install --locked cargo-deny && cargo deny check ``` # git cliff Please replace the url in line 49 of the cliff.toml file with the repository url to trigger the automatic generation of changelogs. # About Salvo You can view the salvo documentation and more examples at https://salvo.rs/ 📖. If our tools have helped you, please star [salvo](https://github.com/salvo-rs/salvo) and [salvo-cli](https://github.com/salvo-rs/salvo-cli), which will greatly encourage us. ❤️