A simple go server.
Check Assignment file for details.
- Configure GO in your system.
- Open terminal in project directory.
- Download the dependencies using this command:
go mod download
- Set environment variable to the system for building the application:
CGO_ENABLED=0
GOOS=linux
- Build the application binary:
go build .
- Set environment variable for running:
PORT=<your_desired_port>
- Run the built binary:
./docker-gs-ping
orgo run .
- Go to
http://localhost:<given_port>
and check if you see "Hello, from Ostad! <3
". - Go to
http://localhost:<given_port>/health
and check if you see "{"Status": "OK"}
".