Creating Web Apps

Version added 04-Apr-2018| Modified 16-Jun-2019

External web apps that must be deployed on a webOS OSE device, can be created and deployed using CLI commands that are provided by webOS OSE SDK. This topic describes the steps to create an external web app. For detailed information on the commands, see Command Line Interface.

If you want to add a JS service to your web app, see Creating JS Services.

Step 1: Create Web App Project

You must start by creating a project using one of the available web app templates. These templates provide a starting point for developing the web app.

To create a basic web app, execute the following command:

ares-generate -t basic sampleApp

In the above command:

  • <basic> is the name of template that creates a basic web app.

  • <sampleApp> is the web app directory which is created in the current directory.

The web app directory (sampleApp) has the following files: 

Directory / File



webOS library directory to call LS2 API.


Configuration file that includes metadata for the web app.


The icon image file. Can be replaced with relevant icon.


The large icon image file. Can be replaced with relevant icon.


Web application main page. This page only shows "Hello World" text on screen.

If you already have an existing web app that you want to deploy on a webOS OSE device, you must add the 'appinfo.json' file to the app root directory. To create this file, on the SDK CLI, enter the following command:
ares-generate -t webappinfo webApp

See Step 2 below for more information on the 'appinfo.json' file.

Step 2: Configure Web App

The details or metadata of the web app must be specified in the appinfo.json file. This file is automatically created when you create a web app project. For details, see appinfo.json.

The CLI provides the 'appinfo.json' file template as below.

    "id": "",
    "version": "0.0.1",
    "vendor": "My Company",
    "type": "web",
    "main": "index.html",
    "title": "new app",
    "icon": "icon.png",
    "largeIcon": "largeIcon.png",
    "requiredPermissions": ["time", "", "activities.manage"]
If you are packaging a JS service within the web app and the JS service uses methods of external services, you must add the group information of the external methods used by the JS service to the requiredPermission field in the appinfo.json.

Step 3: Develop Web App

Design and implement the source code for the web app.

By default, the basic web app template includes some basic code that prints a "Hello World" message. Therefore, if you want to create a demo web app to test this process, you can skip this step and proceed.

If you want to use a webOS service in the web app, check the information and sample code provided in the "Developing the Web App" section in "Develop and Configure".

Step 4: Package Web App

After developing the web app it must be packaged as an IPK file. Make sure the 'appinfo.json' file is available, as it is required when packaging a web app for webOS OSE.

To package the web app use the ares-package command. The IPK file is stored in the current directory.

General usage:

ares-package APP_DIR SERVICE_DIR

In the above command, APP_DIR and SERVICE_DIR mean app and service directories respectively. You can use an absolute or relative path for both APP_DIR and SERVICE_DIR.

Sample usage:

  • Packaging web app only (relative path):

    Windows: ares-package sampleApp

    Linux/MacOS: ares-package ./sampleApp

  • Packaging web app with one JS service (relative path):

    Windows: ares-package sampleApp sampleService

    Linux/MacOS: ares-package ./sampleApp ./sampleService

  • Packaging web app with multiple JS services (relative path):

    Windows: ares-package sampleApp sampleService sampleServiceNew 

    Linux/MacOS: ares-package ./sampleApp ./sampleService ./sampleServiceNew

  • Packaging web app with JS service (absolute path)

    Windows: ares-package c:\samples\sampleApp c:\samples\sampleService

    Linux/MacOS: ares-package ~/samples/sampleApp ~/samples/sampleService

Step 5: Install Web App

Before installing the app, you need to add the webOS OSE target device to the list of registered devices using the ares-setup-device command. For more information, see ares-setup-device. Skip this step if the target device is already present in the list. 

To get a list of target devices use the command:ares-setup-device –list

To get a list of target device (with all properties) use the command:ares-setup-device –listfull

Make sure the webOS OSE target device is running during the installation.

To install the web app on the target device, execute the following command:

ares-install --device device ./com.domain.app_0.0.1_all.ipk

In the above command:

  • <device> is the name of the target device.

  • <./com.domain.app_0.0.1_all.ipk> is the name of the IPK file that is generated after packaging the app in previous step.

You can verify the installation by checking if the web app ID (in this case; is available in the output of the following command: 

ares-install --device device --list
You can remove the app from the device, by using the 'ares-install' command as follows:
ares-install --device device --remove

Step 6: Launch Web App

To launch the web app on the target device, execute the following command:

ares-launch --device device

In the above command:

  • <device> is the name of the target device. This is the same device on which the app was installed in previous step.

  • <> is the app ID that is available after installing the app.

After executing the above command, check the target device to see if the app is running.

You can close the app, by using the 'ares-launch' command as follows:
ares-launch --device device --close
Except as noted, this content is licensed under Creative Commons Attribution 4.0 and sample code is licensed under Apache License 2.0.