From b81cc6c8371279ff9aaa21a72975998a1af677b1 Mon Sep 17 00:00:00 2001 From: "L.A. Fernando" Date: Thu, 7 Feb 2019 22:48:58 -0800 Subject: [PATCH] Update to latest service syntax --- microservices/app/src/hello_service.bal | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/microservices/app/src/hello_service.bal b/microservices/app/src/hello_service.bal index 0205fa9..d230c7a 100644 --- a/microservices/app/src/hello_service.bal +++ b/microservices/app/src/hello_service.bal @@ -8,12 +8,12 @@ import ballerina/io; // is accessible at '/hello', and bound to a the listener on // port 9090. `http:Service`is a connector in the `http` // package. -service hello bind { port: 9090 } { +service hello on new http:Listener(9090) { // A resource is an invokable API method. // Accessible at '/hello/sayHello’. // 'caller' is the client invoking this resource. - sayHello (endpoint caller, http:Request request) { + resource function sayHello(http:Caller caller, http:Request request) { // Create object to carry data back to caller. http:Response response = new;