This repository contains a simple Go web server that demonstrates how to serve static HTML files and handle HTTP requests. It's a perfect starting point for beginners interested in web development with Go.
main.go
: The main Go file containing the server logic.static/
: Directory containing static HTML files.index.html
: Homepage of the web server.form.html
: HTML form page for user input.hello.html
: Greeting page.
-
Make sure you have Go installed on your machine. If not, you can download it from here.
-
Clone this repository:
git clone <repository-url>
-
Run the Go web server:
go run main.go
-
Open your web browser and visit http://localhost:8080 to see the web server in action.
- Homepage - Welcomes users and provides navigation links.
- /form: Form Page - Allows users to submit a form.
- /hello: Greeting Page - Displays a friendly greeting