Skip to content

Latest commit

 

History

History
29 lines (24 loc) · 850 Bytes

README.md

File metadata and controls

29 lines (24 loc) · 850 Bytes

Go Server

A simple go server.

Note

Check Assignment file for details.

Instructions to run locally

  1. Configure GO in your system.
  2. Open terminal in project directory.
  3. Download the dependencies using this command:
    go mod download
  4. Set environment variable to the system for building the application:
    • CGO_ENABLED=0
    • GOOS=linux
  5. Build the application binary:
    go build .
  6. Set environment variable for running:
    • PORT=<your_desired_port>
  7. Run the built binary: ./docker-gs-ping or go run .

Check if the server is running

  1. Go to http://localhost:<given_port> and check if you see "Hello, from Ostad! <3".
  2. Go to http://localhost:<given_port>/health and check if you see "{"Status": "OK"}".