Skip to content

ndneighbor/go-mux-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Mux Starter Application

This is a basic Go application using the Gorilla Mux router. It provides an extensible structure for building web applications and APIs in Go.

Features

  • Modular Structure: Organized code to make it easy to understand and extend.
  • Middleware Support: Includes a sample logging middleware to log all incoming HTTP requests.
  • Dynamic Routing: Demonstrates how to handle dynamic URL parameters with Mux.
  • Error Handling: Graceful handling of errors (can be extended based on application needs).

How to Use

  1. Access the Application:
    • Open a browser or use a tool like curl to navigate to:
      • http://localhost:8080/
      • http://localhost:8080/about
      • http://localhost:8080/user/YourName
    • Replace localhost with your domain name

Notes

  • The application by default runs on port 8080. You can modify this in the main.go file if needed.
  • The logging middleware currently logs all incoming requests to the terminal. For production applications, consider using a dedicated logging package or system.
  • Always keep your packages updated to get the latest security and performance improvements.
  • This is a starter template. You may need to adjust the structure, add error handling, database connections, etc., as per your specific requirements.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages