Skip to content

mahmudunnabikajal/Ostad_docker-exam-1

Repository files navigation

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"}".

About

Module 5 - Exam Week 1

Topics

Resources

Stars

Watchers

Forks