# EasyClickupdateIecRust **Repository Path**: Mr_laogui/EasyClickupdateIecRust ## Basic Information - **Project Name**: EasyClickupdateIecRust - **Description**: EasyClickupdateIecRust项目是一个易点云测项目的热更新版本管理系统 功能:1.iec文件上传支持多项目 2.多个项目的iec文件版本管理(切换版本,删除版本,清理旧版本.删除项目) 3.服务端日志系统(信息,错误,警告,请求,更新) 记录了项目的各个版本历史 ,请求历史,版本切换历史,删除历史,项目删除历史 - **Primary Language**: Rust - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1 - **Created**: 2025-10-10 - **Last Updated**: 2025-10-16 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # EasyClick Project Hot Update System (Rust Reconstruction Edition) ## Project Overview EasyClick is a management system that supports project hot updates. Reconstructed using the Rust programming language, it provides stable and efficient update services. The system supports features such as version management, file upload and download, and log recording, making it suitable for project scenarios requiring dynamic updates. ## Features - **Hot Update Support**: Update project versions without restarting the service - **Version Management**: Supports version switching, rollback, deletion, and cleanup - **File Upload and Download**: Provides a secure and reliable file transfer mechanism - **Log Recording**: Detailed system operation logs for debugging and monitoring - **System Monitoring**: Real-time monitoring of system resource usage - **Cross-Origin Support**: Supports configuration of allowed cross-origin sources, facilitating front-end and back-end separated development ## Usage Instructions ### Starting the Service Ensure Rust and Cargo are installed, then run the following command to start the service: ```bash cargo run ``` ### Development Mode with Hot Reload During development, use the following command to enable hot reload: ```bash cargo watch -x run ``` ### Building the Release Version To build the release version, use the following command: ```bash cargo build --release ``` ## Configuration File Description (config.toml) The configuration file `config.toml` is used to configure system parameters and mainly includes the following sections: ### Optional Database Configuration ```toml [database] url = "sqlite:./data/updateEC.db" # SQLite connection string # Or use MySQL: "mysql://user:password@localhost:3306/updateEC" ``` ### Optional Security Configuration ```toml [security] allowed_origins = ["http://localhost:3000"] # Allowed cross-origin sources ``` ## API Interface Description ### Basic Information - **Service Address**: `http://localhost:8080` - **Supported Protocols**: HTTP/HTTPS ### Main Interfaces 1. **Upload File**: `POST /upload` 2. **Get Project List**: `GET /projects` 3. **Version Management**: `GET /versions` 4. **Get Logs**: `GET /logs` 5. **Version Switching**: `POST /switch` 6. **Version Rollback**: `POST /rollback` 7. **Delete Version**: `POST /delete/version` 8. **Clean Up Versions**: `POST /cleanup` 9. **Set Project Status**: `POST /set_status` 10. **Delete Project**: `POST /delete/project` ## Deployment Guide (BT Panel) ### Environment Preparation - Install BT Panel - Install Nginx or Apache - Configure domain name resolution ### Frontend Static Resource Deployment Upload static resource files (e.g., `upload.html`, `version-manager.html`, `logs.html`) to the website root directory. ### Backend API Service Deployment 1. Copy the `updateEC-service.sh` script to the system directory. 2. Use the script to manage the service: ```bash chmod +x updateEC-service.sh ./updateEC-service.sh start ``` ### HTTPS Configuration Configure an SSL certificate in BT Panel and enable the HTTPS protocol. ## Development Guide ### Rust Development Environment Setup 1. Install Rust: `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh` 2. Install OpenSSL Development Package (Linux): `sudo apt-get install libssl-dev` ### Common Development Commands - **Start Development Server**: `cargo run` - **Code Formatting**: `cargo fmt` - **Code Linting**: `cargo clippy` ## Copyright Information This project follows the MIT License agreement. For details, please check the `LICENSE` file.