✨ Add broker-service
This commit is contained in:
parent
2796d816e8
commit
60aeac4f4b
5 changed files with 90 additions and 0 deletions
28
broker-service/cmd/api/main.go
Normal file
28
broker-service/cmd/api/main.go
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
const webPort = "8085"
|
||||
|
||||
type Config struct{}
|
||||
|
||||
func main() {
|
||||
app := &Config{}
|
||||
|
||||
log.Printf("Starting broker service on port %s\n", webPort)
|
||||
|
||||
// http.server
|
||||
srv := &http.Server{
|
||||
Addr: fmt.Sprintf(":%s", webPort),
|
||||
Handler: app.routes(),
|
||||
}
|
||||
|
||||
err := srv.ListenAndServe()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue