A search engine built with Rust, Actix Web, and MongoDB, deployed on DigitalOcean.
- CRUD Operations: Create, Read, Update, Delete operations for managing data.
- Search Functionality: Search through the data using MongoDB queries.
- API Endpoints: RESTful API endpoints for interacting with the search engine.
- Pagination: Pagination support for search results.
- Authentication: Basic authentication and authorization (if applicable).
- Rust (latest version)
- MongoDB
- Docker (for deployment)
- DigitalOcean account
- Clone the repository:
git clone https://github.com/jayadityadev/Rust-Bootcamp.git
- Install dependencies:
Navigate into the directory using
cdand build the source codecd Rust-Bootcamp cargo build - Set up MongoDB:
- Install MongoDB and start the service.
- Create a database and collection for your data.
- Seed the database with initial data.
- Start the MongoDB service:
mongod --config /usr/local/etc/mongod.conf
- Run the application:
cargo run
- Access the API at http://localhost:8080.
- Build the Docker image:
docker build -t rust-search-engine . - Run the Docker container:
docker run -d -p 8080:8080 rust-search-engine
- Create a Droplet on DigitalOcean with Docker installed.
- SSH into the Droplet and clone your repository.
- Build and run the Docker container on the Droplet.
- GET /search: Search the database.
- POST /items: Create a new item.
- GET /items/{id}: Get an item by ID.
- PUT /items/{id}: Update an item by ID.
- DELETE /items/{id}: Delete an item by ID.
Contributions are welcome! Please open an issue or submit a pull request.
For any questions or suggestions, please contact jayaditaydev26@outlook.com