1 of 20
2 of 20
3 of 20
4 of 20
5 of 20
6 of 20
7 of 20
8 of 20
9 of 20
10 of 20
11 of 20
12 of 20
13 of 20
14 of 20
15 of 20
16 of 20
17 of 20
18 of 20
19 of 20
20 of 20

doc

How to install the Hello World solution from Azion’s Marketplace

Overview

The Hello World function is a simple program often used to introduce beginners to a new programming language or development environment. As result, the message Hello, world! is usually displayed on the screen or console.

Considering it’s a simple and easy-to-understand example to show the basic syntax and structure of some programming language, the Hello World is a common first step in learning a new programming language.

The specific implementation of a “Hello World” function or program will differ depending on the programming language and/or framework used.


1. Getting the solution
2. Using the solution
2.1 Configuring the solution
2.2 Instantiating the solution
3. Configuring the Rules Engine


1. Getting the solution

The Hello World solution is a serverless solution available at Azion’s Marketplace. This type of solution is mainly used to show how the technology works. It will simply display a message, Hello World, on your browser using an edge pplication.

To use the Hello World solution provided by Azion’s Marketplace, you have to:

  1. Log in to your Real-Time Manager (RTM) account.
  2. On the upper-left corner of the page, select Products Menu > Marketplace.
  3. Select the search box and type “hello” or browse through the cards to find the Hello World solution.
  4. Once you’ve found the Hello World card, select it to go to the solution page.
  5. On the solution page, look for the Subscribe for section on the bottom-right corner.
  6. Click the Get It Now button.

You’ll see a message indicating that your solution was successfully installed and is ready to use.

2. Using the solution

Once you’ve gotten your solution on Marketplace, it’ll be available at your Edge Functions list. To use the solution, you’ll have to create a new Edge Application.

To learn how to create an edge application, visit the documentation on getting started. You can also create an Edge Application through RTM > Products Menu > Edge Application and follow the instructions.

Note: you can also use an already existing Edge Application.

2.1 Configuring the solution

To configure your solution, proceed as follows:

  1. On the upper-left corner, select Products Menu > Edge Applications on the BUILD section.
  2. On the listing page of your edge applications, select the one you’ve created to use with the Hello World solution.
  3. On the application page, on the Main Settings tab, locate the Edge Functions switch and turn it on.
  4. Click the Save button.

You’ll receive a successful message indicating your Edge Application was updated. The use of Edge Functions is now enabled for your application.

2.2 Instantiating the solution

To enable this function, while still on the Edge Application page:

  1. Select the Functions tab on the top list.
  2. Click the Add Function button.
  3. Choose an easy to remember name for your function.
  4. On the dropdown function menu, select the Hello World [Global] function.

This will load the function, showing a box with the code of the function and two tabs: Code and Args.

If you click on the Code tab, you can navigate through the code to become familiar with how the code works, but you can’t change anything. The configuration of your function will be made on the Args tab.

Click on the Args tab to open the code box for the args where you’ll add the parameters to execute your application.

Since this is just a Hello World function, you only have the choice to change the message you want to display when someone visits the domain of your edge application.

This is JSON file for the parameters:

{
    "param":{
        "http_status": 200,
        "body": "It works!"
    }
}

Where:

  • http_status: indicates the status of the application. The 200 status indicates that the request was successful.
  • body: indicate the message, in the string format, you want to print on the screen. The default value is “It Works!”, but you can write anything in that field.
  1. Click the Save button.

3. Configuring a rule on Rules Engine

Still in the Edge Applications page, in the Rules Engine tab, you have to configure the rules you want (criteria and behavior) apply to run your function.

To do so, follow these steps:

  1. Select the Rules Engine tab.
  2. Click on Default Rule.
  3. On the behavior field, select Run Function from the dropdown menu and then select the Hello World function, according to the name you gave it in the instantiation step.

Note: you can’t change the criteria field for the Default Rule on Rules Engine.

  1. Click the Save button.

Done. Now you have a Hello World function running on the edge. The result is a text message that matches the value you passed on the body parameter.


Didn’t find what you were looking for? Open a support ticket.