Skip to content

devangtomar/simple-go-webserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Web Server Example 🚀

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.

Project Structure 📁

  • 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.

How to Run the Server 🏃‍♂️

  1. Make sure you have Go installed on your machine. If not, you can download it from here.

  2. Clone this repository:

    git clone <repository-url>
  3. Run the Go web server:

     go run main.go
  4. Open your web browser and visit http://localhost:8080 to see the web server in action.

Routes and Pages 🌐

  • Homepage - Welcomes users and provides navigation links.
  • /form: Form Page - Allows users to submit a form.
  • /hello: Greeting Page - Displays a friendly greeting

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published