A simple TCP server implementation that handles basic HTTP GET requests. This server listens on port 8080 and responds with index.html
file for requests to the root path (/
). It returns a 404.html
file for all other paths.
- Listens for TCP connections on
localhost:8080
. - Handles basic HTTP GET requests (
/
) & other not supported paths.
- Go (version 1.22.1 or higher)
go run main.go
- Homepage
curl http://localhost:8080/
- Other paths
curl http://localhost:8080/example