Working with Ballerina
It's time to put ourselves in the Ballerina programmer′s shoes and start coding our first Ballerina project. After that, we need to download and install it, so we need to go to the official website and download the latest Ballerina tools distribution, which contains the runtime and the tools needed for writing our Ballerina project; for this, visit https://ballerinalang.org/downloads/.
After downloading it, extract the content into a directory that we call <BALLERINA_HOME>
, and we need to set the PATH
environment variable to the <BALLERINA_HOME>/bin
directory:
export PATH = $PATH:/User/user/ballerina-tools-0.8.3/bin
Now, we are ready to start with the classic first example to understand a new programming language, the Hello World project!
To execute the helloWorld
project, we must use the following command in a terminal from the <BALLERINA_HOME>/samples
directory:
ballerina run main helloWorld/helloWorld.bal
This will return the following message:
Hello...