This Go application demonstrates a simple HTTP server implementation using the Go programming language. It provides an HTTP server that listens on port 10101 and exposes an endpoint to retrieve YouTube channel statistics.
To run this application, make sure you have the following prerequisites installed:
- Go (version 1.16 or higher)
-
Clone the repository:
git clone https://github.com/piojagcodes/golang_template_server.git
-
Change into the project directory:
cd golang_template_server
-
Build the application:
go build
-
Run the application by executing the generated binary:
./go-http-server
-
To gracefully shut down the server, use one of the following methods:
Press Ctrl+C in the terminal where the server is running.
The server will attempt to complete ongoing requests and then shut down.