diff options
author | Wolfy-J <[email protected]> | 2018-06-11 12:38:39 +0300 |
---|---|---|
committer | Wolfy-J <[email protected]> | 2018-06-11 12:38:39 +0300 |
commit | 72f81fe1d46ab43e24e9a5c23c5ca54bfe6d701d (patch) | |
tree | 3a94b89ae0ce897d9234de98d95c3cc9bd266a11 /cmd/rr/main.go | |
parent | efcddcc8d1b676c64cbd41a5f645bd046ba416d7 (diff) |
no more updated
Diffstat (limited to 'cmd/rr/main.go')
-rw-r--r-- | cmd/rr/main.go | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/cmd/rr/main.go b/cmd/rr/main.go index 470e4795..68311da2 100644 --- a/cmd/rr/main.go +++ b/cmd/rr/main.go @@ -26,7 +26,7 @@ import ( rr "github.com/spiral/roadrunner/cmd/rr/cmd" // services (plugins) - rrhtp "github.com/spiral/roadrunner/service/http" + "github.com/spiral/roadrunner/service/http" "github.com/spiral/roadrunner/service/rpc" "github.com/spiral/roadrunner/service/static" @@ -35,23 +35,17 @@ import ( "github.com/spiral/roadrunner/cmd/rr/debug" "github.com/spf13/cobra" - _ "net/http/pprof" - "log" - "net/http" ) var debugMode bool func main() { - go func() { - log.Println(http.ListenAndServe("localhost:6060", nil)) - }() // provides ability to make local connection to services rr.Container.Register(rpc.Name, &rpc.Service{}) // http serving - rr.Container.Register(rrhtp.Name, &rrhtp.Service{}) + rr.Container.Register(http.Name, &http.Service{}) // serving static files rr.Container.Register(static.Name, &static.Service{}) @@ -62,8 +56,8 @@ func main() { rr.CLI.PersistentFlags().BoolVarP(&debugMode, "debug", "d", false, "debug mode", ) cobra.OnInitialize(func() { if debugMode { - service, _ := rr.Container.Get(rrhtp.Name) - service.(*rrhtp.Service).AddListener(debug.NewListener(rr.Logger).Listener) + service, _ := rr.Container.Get(http.Name) + service.(*http.Service).AddListener(debug.NewListener(rr.Logger).Listener) } }) |