https://github.com/mahmudunnabikajal/ostad_docker-exam-1
Module 5 - Exam Week 1
https://github.com/mahmudunnabikajal/ostad_docker-exam-1
docker golang
Last synced: 4 months ago
JSON representation
Module 5 - Exam Week 1
- Host: GitHub
- URL: https://github.com/mahmudunnabikajal/ostad_docker-exam-1
- Owner: mahmudunnabikajal
- Created: 2024-04-03T19:14:26.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-28T12:00:53.000Z (about 1 year ago)
- Last Synced: 2025-01-05T10:31:39.050Z (5 months ago)
- Topics: docker, golang
- Language: Dockerfile
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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"}`".