iprust is a simple web application built with Actix-Web in Rust. It's designed to return the public IP address of the client making a request to the server.
- Responds with the client's public IP address.
- Built with Actix-Web, a powerful and efficient web framework for Rust.
- Easy to deploy with Docker and Docker Compose.
- Rust
- Cargo
- Docker (for containerization)
To get started with iprust, clone the repository and navigate into the project directory:
git clone https://github.com/yourusername/iprust.git
cd iprustYou can run the application locally using Cargo:
cargo runThe server will start and listen for requests. You can test it by accessing http://localhost:3000 in your browser or using a tool like curl.
To build and run the application using Docker and Docker Compose, use the following commands:
docker compose build
docker compose upThis will start the application in a Docker container. The service will be available on the port specified in your .env file.
The application can be configured through environment variables. Create a .env file in the project root with the following content:
PORT=3000
RUST_LOG=infoPORT: The port number on which the application will listen.RUST_LOG: The logging level for the application.