Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mahmudunnabikajal/ostad_docker-exam-1

https://github.com/xaadu/ostad_docker_assignment_1_batch_1
https://github.com/mahmudunnabikajal/ostad_docker-exam-1

docker golang

Last synced: 24 days ago
JSON representation

https://github.com/xaadu/ostad_docker_assignment_1_batch_1

Awesome Lists containing this project

README

        

# Go Server

A simple go server.

## Note
Check [Assignment](./ASSIGNMENT.md) file for details.

### Instructions to run locally

1. Configure [GO](https://go.dev/doc/install) in your system.
2. Open terminal in project directory.
3. Download the dependencies using this command:
```bash
go mod download
```
4. Set environment variable to the system for building the application:
* `CGO_ENABLED=0`
* `GOOS=linux`
5. Build the application binary:
```bash
go build .
```
5. Set environment variable for running:
* `PORT=`
5. Run the built binary: `./docker-gs-ping` or `go run .`

### Check if the server is running
1. Go to `http://localhost:` and check if you see "`Hello, from Ostad! <3`".
2. Go to `http://localhost:/health` and check if you see "`{"Status": "OK"}`".