The dumbest HTTP server you can find. Send a request and have it echoed back to you.
go run echoserver.go
Then point your browser to http://localhost:8080.
The port will be set to 8080
by default. If you want to run the server on another port, pass it as a parameter:
go run echoserver.go 8090
Follow the instructions below to dockerize the server.
docker build -t go-http-echo-server .
If you don't want to use the default port (8080
), make sure you change that in the Dockerfile before building the image.
docker run -d -p 8080:8080 go-http-echo-server