# README
golangwebpage
Overview
Example of a web server created using GO, running from a Docker container
How to Run in Docker Container
From repository firstly have to build the image using the following
docker build -t "cycling-blog" .
Once the image has completed building, this is now ready to run
docker run -d -p 8080:8080 cycling-blog:latest
# Functions
ActivitiesHandler Page uses the DbConnect function to connect to the backend database Once connected this function will run a query against the database pushing results to a variable The variables will save these results to the Ride struct.
DbConnect uses variable to load values from .env file and then pass them in connection parameters via a struct.
HomeHandler Page uses the Welcome struct to post welcome message and time on page loading.
# Variables
DB variable set in the main function to set the parameters used by query in RideHandler function to return correct data.