To Develop application run the Dev-Pack containers set. It is required to generate html and js codes after changing jForm file.
It includes:
Note: Dev-Pack uses API Bridge to communicate with Aperio APIs on the backend. During development programmers usually use an already existing API bridge. There is required just to provide http address of existing API Bridge.
cat "<file-where-you-keep-image-registry-key>" | docker login -u iamapikey --password-stdin de.icr.io/ipt-eu-fr-dev-dc1
Example:
cat "C:\gitRepos\image-registry\key.txt" | docker login -u iamapikey --password-stdin de.icr.io/ipt-eu-fr-dev-dc1
NOTE: If you do not know the image registry key enter ticket to Helpdesk" helpdesk@ibs.zendesk.com. Ask for API key for image registry. You only need read access. After You receive your API key, store the value in text file somewhere on your PC. You will use it whenever would like to login to image registry.
TIP: If you do not know if your local copy of images is fresh, run docker on your machine then go to images section and delete listed above images. Then they will be pulled next time when you run containers.
TIP: Go into compose.yml file to see which image tags are used to develop your mobile application.
NOTE: To be possible to generate html/js, the app should contain develop.json file present in develop folder. The develop.json file describes its development profile (e.g. default ERP environment and company used to get metadata). Adjust develop.json file if needed.
Example of develop.json file.
[
{
"environment": {
"name": "DEV121A",
"params": {
"companyCode": "DV"
}
}
}
]
To be possible to develop Mobile App you need to preconfigure containers. To do so you need to copy example.env into .env file. Then change .env file. See explanation of variables inside .env file.
NOTE: Most variables are preset for you in example.env file.
Run docker compose.
docker compose up -d
To stop containers, you can simply remove containers using Docker UI, or run command.
docker compose down
When the development pack containers are running, use the following links to test and start application:
NOTE: By default, your application is served under port: 8081
Example: To run mobile application from Dev-Pack: http://localhost:8081/aperio/app?name=jfexamples-erp-12
Example: To run mobile application from Dev-Pack in develop mode: http://localhost:8081/aperio/app?name=jfexamples-erp-12&develop=true
If Dev-Pack is running, it automatically generates html/js after corresponding jForm files are changed and saved.
NOTE: We recommend using develop mode link to application (containing develop=true in url)/ Because then the form is refreshed every time is loaded. You do not need to restart application to see changes.
NOTE: Some changes in application may require restarting Dev-Pack. Follow instructions for Stop and Start containers.
NOTE: Some changes generated by Aperio tool are visible in the application only when you close browser tab and go to the application link once again.