A simple HTTP server is written in Go for testing purposes.
- Listens on a specified port.
- Handles requests with random timeouts.
- Logs all incoming requests.
go run main.go -port 8000 -timeout 5000This will start the server on port 8000 with a maximum timeout of 5000 milliseconds for the endpoint.
timeout: Handles requests with a random timeout between 0 and the maximum timeout specified at startup./: Handles all other requests and logs them.
- Clone the repository.
- Navigate to the project directory.
- Run
go buildto compile the application. - Run the application with the desired flags.
- Go 1.18 or later.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please replace the MIT with the actual link to your license file if you have one.