Giter Site home page Giter Site logo

hello's Introduction

Ballerina Hello Extension

Annotation based build extension implementation for ballerina.

Features:

  • Generate text file with the greetings

Supported Annotations:

@hello:Greeting{}

Annotation Name Description Default value
salutation Greeting or Acknowledgement Hello!

How to run

  1. Download and install JDK 8 or later
  2. Get a clone or download the source from this repository (https://github.com/ballerinax/hello)
  3. Run the Maven command mvn clean install from within the hello directory.
  4. Copy target/hello-extension-0.970.0.jar file to <BALLERINA_HOME>/bre/lib directory.
  5. Run ballerina build <bal filename> to generate artifacts.

The hello world artifacts will be created in a folder called target with following structure.

target/
├── outputfilename.txt
└── outputfilename.balx

Annotation Usage Sample:

import ballerina/http;
import ballerinax/hello;

@hello:Greeting{salutation : "Guten Tag!"}
@http:ServiceConfig {
    basePath:"/helloWorld"
}
service<http:Service> helloWorld bind {port:9091}{
    sayHello (endpoint outboundEP, http:Request request) {
        http:Response response = new;
        response.setStringPayload("Hello, World from service helloWorld ! \n");
        _ = outboundEP -> respond(response);
    }
}

hello's People

Contributors

anuruddhal avatar lakwarus avatar maheshika avatar

Watchers

Riyafa Abdul Hameed avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.