summaryrefslogtreecommitdiff
path: root/cmd/rr/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/rr/main.go')
-rw-r--r--cmd/rr/main.go14
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)
}
})