Edit in GitHubLog an issue

Deploying your First Adobe I/O Runtime Function

Test your installation and configuration of the CLI by creating and deploying your first function. Create the following function in any editor and save it as hello.js:

Copied to your clipboard
function main(params) {
return { payload: 'Hello ' + params.name };
}

Next, open a command-line window and navigate to the folder where you saved the function. Type the following command to create an action from this function:

aio rt:action:create hello hello.js

This command uploads the code contained in hello.js and stores it in Runtime as an action named hello. That’s really all there is to it: your function is deployed. If the command is successful, you should see the following acknowledgement in the command-line window:

ok: created action hello

Now, to test the function, invoke it as an action:

aio rt:action:invoke --result hello --param name <your name>

You should get this output:

Copied to your clipboard
{
"payload": "Hello <your name>"
}

That’s it! You’re ready to begin developing on Adobe I/O Runtime. For ideas on what to next, see Using Adobe I/O Runtime.

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.