aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/http/main.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/http/main.go b/examples/http/main.go
index 730fc03..5783c05 100644
--- a/examples/http/main.go
+++ b/examples/http/main.go
@@ -5,13 +5,15 @@ import (
"errors"
"net/http"
- "github.com/neonxp/jsonrpc2"
+ httpRPC "github.com/neonxp/jsonrpc2/http"
+ "github.com/neonxp/jsonrpc2/rpc"
)
func main() {
- s := jsonrpc2.New()
- s.Register("multiply", jsonrpc2.Wrap(Multiply))
- s.Register("divide", jsonrpc2.Wrap(Divide))
+ s := httpRPC.New()
+
+ s.Register("multiply", rpc.Wrap(Multiply))
+ s.Register("divide", rpc.Wrap(Divide))
http.ListenAndServe(":8000", s)
}