Skip to content

Add Choreo related template and config files #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ui2/.devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"image": "ballerina/ballerina-devcontainer:2201.3.1",
"extensions": ["WSO2.ballerina"],
}
1 change: 1 addition & 0 deletions ui2/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target
9 changes: 9 additions & 0 deletions ui2/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[build-options]
observabilityIncluded = true

[package]
distribution = "2201.3.1"
name = "empty_sample"
org = "selvaratnamuthaiyashankar"
version = "0.1.0"

4 changes: 4 additions & 0 deletions ui2/Cloud.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[settings]
buildImage = false
thinJar = false

17 changes: 17 additions & 0 deletions ui2/service.bal
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import ballerina/http;

# A service representing a network-accessible API
# bound to port `9090`.
service / on new http:Listener(9090) {

# A resource for generating greetings
# + name - the input string name
# + return - string name with hello message or error
resource function get greeting(string name) returns string|error {
// Send a response back to the caller.
if name is "" {
return error("name should not be empty!");
}
return "Hello, " + name;
}
}