add dummy routes and handlers and update makefile
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"servicea/internal/domains/meteo"
|
||||
"servicea/internal/router"
|
||||
)
|
||||
|
||||
func main() {
|
||||
mux := http.NewServeMux()
|
||||
mux := router.SetupRoutes()
|
||||
|
||||
mux.HandleFunc("GET /hello", func(w http.ResponseWriter, r *http.Request) {
|
||||
log.Println("Received request on /hello endpoint")
|
||||
fmt.Fprintf(w, "Hello world from service A")
|
||||
})
|
||||
meteoHandler := meteo.NewHandler()
|
||||
meteo.RegisterRoutes(mux, meteoHandler)
|
||||
|
||||
slog.Info("server starting on :8080")
|
||||
http.ListenAndServe(":8080", mux)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user