This project is a simple web application that indexes content from various websites. It sets up a TCP server using Rust, which listens for incoming requests and serves static files or JSON data based on the request type.
engine
├── src
│ └── main.rs # Main logic of the application
├── static
│ ├── index.html # Main HTML page for the application
│ └── app.js # JavaScript code for client-side interactions
├── Cargo.toml # Rust project configuration file
├── index.json # Stores indexed data of websites in JSON format
└── README.md # Documentation for the project
-
Clone the Repository
git clone <repository-url> cd engine
-
Install Rust Ensure you have Rust installed on your machine. You can install it from rust-lang.org.
-
Build the Project Run the following command to build the project:
cargo build
-
Run the Server Start the server with:
cargo run
The server will be accessible at
http://localhost:8080.
Usage The best way to use the application is to run the exe file, but alternatively, you may run the Rust backend on your laptop or a server to run it as a website.
Navigate to http://localhost:8080 in your web browser to access the application. Or alternatively, change the IP address to wherever your server is hosting it.
- Use the provided API to index websites by sending a POST request to
/api/indexwith a JSON body containing the URL. - Search indexed websites by sending a GET request to
/api/search?query=<your-query>.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.