2024-08-28 07:28:34 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"log"
|
|
|
|
"net/http"
|
|
|
|
)
|
|
|
|
|
2024-08-29 11:51:52 +00:00
|
|
|
const webPort = "80"
|
2024-08-28 07:28:34 +00:00
|
|
|
|
|
|
|
type Config struct{}
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
app := Config{}
|
|
|
|
|
|
|
|
log.Printf("Starting broker service on port %s\n", webPort)
|
|
|
|
|
|
|
|
// define http server
|
|
|
|
srv := &http.Server{
|
|
|
|
Addr: fmt.Sprintf(":%s", webPort),
|
|
|
|
Handler: app.routes(),
|
|
|
|
}
|
|
|
|
|
|
|
|
err := srv.ListenAndServe()
|
|
|
|
if err != nil {
|
|
|
|
log.Panic(err)
|
|
|
|
}
|
|
|
|
}
|