Welcome to my Adobe I/O Application!
- Populate the
.envfile in the project root and fill it as shown below
aio app runto start your local Dev server- App will run on
localhost:9080by 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 testto run unit tests for ui and actions - Run
aio app test --e2eto run e2e tests
aio app deployto build and deploy all actions on Runtime and static files to CDNaio app undeployto undeploy the app
You can generate this file using the command aio app use.
# This file must **not** be committed to source control
## please provide your Adobe I/O Runtime credentials
# AIO_RUNTIME_AUTH=
# AIO_RUNTIME_NAMESPACE=- Main configuration file that defines an application's implementation.
- More information on this file, application configuration, and extension configuration 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.jsonand install them usingnpm install. Then set thefunctionfield inapp.config.yamlto point to the entry file of your action folder. We will usewebpackto 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.jsonwith the action's dependencies. Then set thefunctionfield inapp.config.yamlto 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"
}
}