This is a basic static web server implemented in Go that serves static files from the "static" directory, handles a simple "/hello" endpoint, and processes a form submission at "/form".
-
Clone the repository:
git clone https://github.com/Sarthak027/Webserver_made_with_GOLANG.git
-
Navigate to the directory;
cd Webserver_made_with_GOLANG
-
Run the GO application:
go run main.go
This will start the server on http://localhost:8080
/hello
: Responds with a simple "hello!" message for GET requests.
/form
: Handles form submissions and displays the submitted data for POST requests.
Static files such as HTML, CSS, and JavaScript can be placed in the "static" directory, and they will be served by the web server.