Welcome to my Adobe I/O Application!
- Populate the
.env
file in the project root and fill it as shown below
aio app run
to start your local Dev server- App will run on
localhost:9080
by default
By default the UI will be served locally but actions will be deployed and served from Adobe I/O Runtime. To start a
local serverless stack and also run your actions locally use the aio app run --local
option.
- Run
aio app test
to run unit tests for ui and actions - Run
aio app test -e
to run e2e tests
aio app deploy
to build and deploy all actions on Runtime and static files to CDNaio app undeploy
to undeploy the app
# Marketo Rest endpoint host, not the Marketo UI host
MARKETO_REST_HOST=your_marketo_rest_ep_host
MARKETO_CLIENT_ID=your_marketo_client_id
MARKETO_CLIENT_SECRET=your_marketo_client_secret
# Marketo Folder that accepts assets from AEM
MARKETO_FOLDER_ID=your_marketo_folder_id_that accepts_assets_from_aem
# AEMaaCS info
AEM_AUTHOR_HOST=aemaacs_author_host
# refer this to about how to get AEMaaCS service credentials https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/developing/generating-access-tokens-for-server-side-apis.html?lang=en
AEM_SERVICE_CREDENTIALS=aemaacs_service_credentials_got_from_developer_console_in_one_line
# Azure storage info
CUSTOM_AZURE_STORAGEACCOUNT=your_custom_azure_storage_account
CUSTOM_AZURE_STORAGEKEY=your_custom_azure_storage_key
CUSTOM_AZURE_CONTAINERNAME=your_custom_azure_storage_container_name
# Journaling
# your private key associated with your I/O project's JWT service account. You may create a new pair of private/public keys from Service Account (JWT). Make sure you fill newline break with \n and don't forget the double quotes around it
PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\nmy\nprivate\nkey\n-----END PRIVATE KEY-----"
JOURNALING_URL=the_journaling_endpoint_you_get_from_I/O_event_registration
# max numbder of event batches to be fetched per activation/execution
MAX_EVENTS_IN_BATCH=5
- List your backend actions under the
actions
field within the__APP_PACKAGE__
package placeholder. We will take care of replacing the package name placeholder by your project name and version. - For each action, use the
function
field to indicate the path to the action code. - More documentation for supported action fields can be found here.
-
You have two options to resolve your actions' dependencies:
-
Packaged action file: Add your action's dependencies to the root
package.json
and install them usingnpm install
. Then set thefunction
field inmanifest.yml
to point to the entry file of your action folder. We will useparcelJS
to package your code and dependencies into a single minified js file. The action will then be deployed as a single file. Use this method if you want to reduce the size of your actions. -
Zipped action folder: In the folder containing the action code add a
package.json
with the action's dependencies. Then set thefunction
field inmanifest.yml
to point to the folder of that action. We will install the required dependencies within that directory and zip the folder before deploying it as a zipped action. Use this method if you want to keep your action's dependencies separated.
-
While running your local server (aio app run
), both UI and actions can be debugged, to do so open the vscode debugger
and select the debugging configuration called WebAndActions
.
Alternatively, there are also debug configs for only UI and each separate action.
To use typescript use .tsx
extension for react components and add a tsconfig.json
and make sure you have the below config added
{
"compilerOptions": {
"jsx": "react"
}
}