A simple go server.
- Configure GO in your system.
- 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:
go build -o <your_desired_location>/go_server
- Set environment variable for running:
PORT=<your_desired_port>
- Run the built binary:
<your_desired_location>/go_server
- 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"}
".