Ballerina -
(inside a function):
worker w1 returns int return 10;
bal build --cloud=docker bal build --cloud=k8s This creates a Dockerfile , docker-image.yaml , or Kubernetes YAML. ballerina
[container.image] repository = "myorg/myapi" name = "myapi" tag = "v1.0" Ballerina includes a built-in test framework.
Call:
type Person record string name; int age; string email?; // optional field ; Person p = name: "Alice", age: 30 ; Arrays & Maps int[] numbers = [1, 2, 3]; map<string> colors = red: "#FF0000", green: "#00FF00" ; 5. Services & Listeners A service is a collection of remote methods (resources) attached to a listener (e.g., HTTP listener). HTTP Service Example import ballerina/http; service /api on new http:Listener(9090) resource function get greeting(string name) returns string return "Hello, " + name;
function task2() returns string return "done"; (inside a function): worker w1 returns int return
return a / b;


