Skip to content

MiguelAngelHorta/Greeting-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Greeting-App

Simple greeting app using Go

image

Summary

This Go application sets up a basic HTTP server that serves an HTML file and handles requests to a /greet endpoint.

handleGreet

This function handles requests to the /greet endpoint. It retrieves the name parameter from the request URL, generates a greeting message using the retrieved name, and writes the greeting as the HTTP response.

main

This is the main function of the program. It sets up the HTTP server by:

  • Serving the index.html file at the root endpoint /.
  • Registering the handleGreet function to handle requests to the /greet endpoint.
  • Starting the server on port 8080 and prints a message to indicate that the server is running.

image

About

Simple greeting app using Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages