WebAppServer

WebAppServer

Приложение для демонcтрации запуска локального статического веб-сервера и отображения его контента с помощью WebView (Chromium) на ОС Аврора.

RU | EN


WebAppServer

Description

This project provides an example application for browser usage.

The application demonstrates how to start up local static web server and to display its content via WebView (Chromium).

The application allows to:

  • View web-content,
  • View own static web-files.

The WebAppServer application uses the command-line utility static-web-server version 2.38.0 to run a server for displaying static web-files. The static-web-server utility is distributed under MIT license and Apache License (Vesion 2.0). The web files for the static web server must be located in the ~/Documents/WebAppServer/ directory on the device.

The application template is generated using the WebAppGenerator utility.

Table of contents

  1. Compatibility
  2. Build features
  3. Branches info
  4. Install and run
  5. Screenshots
  6. Use cases
  7. Known errors and restrictions
  8. Project structure
  9. Terms of use and participation in development

Compatibility

The application is working correctly since 5.1.3.45 version of Aurora OS.

Build features

This example being built using the Aurora SDK: Documentation

Branches info

Branches

Install and run

The project being built in the usual way using the Aurora SDK: Documentation.

Screenshots

Screenshots

Use cases

Viewing web-content

  • Run the application to view the web content.
  • When the application starts, the static web server will be running and its contents will be displayed in a Chromium-based WebView.
  • By default, the main page will contain a message on how to configure the own static web files to display.

Setting up the display of own web-files

  • To display own static web files, place them to the ~/Documents/WebAppServer/ device directory and restart the application.
  • When the application starts, the directory ~/Documents/WebAppServer/ will be created if it was not created earlier.

Known errors and restrictions

No known errors have been found in the project.

Project structure

The project has a standard structure of an application based on C++ and QML for Aurora OS.

  • CMakeLists.txt file describes the project structure for the CMake build system.
  • icons directory contains application icons for different screen resolutions.
  • initial-site directory contains the HTML-file with default web page to demonstrate the app.
  • libexec directory contains the static-web-server binary files for 3 available architectures: aarch64, armv7l и x86_64.
  • qml directory contains the QML source code and the UI resources.
    • cover directory contains the application cover implementations.
    • icons directory contains the custom UI icons.
    • pages directory contains the application pages.
    • ru.auroraos.WebAppServer.qml file provides the application window implementation.
  • rpm directory contains the rpm-package build settings.
  • src directory contains the C++ source code.
    • main.cpp file is the application entry point.
  • translations directory contains the UI translation files.
  • ru.auroraos.WebAppServer.desktop file defines the display and parameters for launching the application.

Terms of use and participation in development

The source code of the project is provided under the license, which allows its use in third-party applications.

Contributor License Agreement The contributor agreement documents the rights granted by contributors of the Open Mobile Platform.

Information about the contributors is specified in the AUTHORS file.

Code of conduct is a current set of rules of the Open Mobile Platform which informs you how we expect the members of the community will interact while contributing and communicating.