Mongoose daemon mode

Introduction

Mongoose は、Web サーバー、Web インターフェイス、および Web アプリケーションを提供する SWUpdate のデーモン モードです。

web-app の Web アプリケーションは、ビルド ツールとして Node.js パッケージ マネージャーと gulp を使用します。 Bootstrap 4Font Awesome 5Dropzone.js に依存します。

スタートアップ

有効な mongoose Web サーバーで SWUpdate を構成およびコンパイルした後:

./swupdate --help

マングースに提供される必須およびオプションの引数をリストします。 例として、

./swupdate -l 5 -w '-r ./examples/www/v2 -p 8080' -p 'reboot'

ログ レベルの TRACE と Web サーバー (http://localhost:8080) を使用して、mongoose デーモン モードで SWUpdate を実行します。

Example

The ready to use example of the web application in the examples/www/v2 directory uses a Public Domain background.jpg image from pixabay with is released under the Creative Commons CC0 license. The used favicon.png and logo.png images are made from the SWUpdate logo and therefore subject to the GNU General Public License version 2. You must comply to this license or replace the images with your own files.

Customize

You could customize the web application inside the web-app directory. Beside the replace of the favicon.png, logo.png and background.jpg images inside the images directory you could customize the Bootstrap colors and settings inside the scss/bootstrap.scss style sheet. The style sheet changes need a rebuild of the web application source code.

Develop

The development requires Node.js version 6 or greater and a prebuilt SWUpdate project with enabled mongoose web server and web application interface version 2 support.

  1. Enter the web application directory:

    cd ./web-app
    
  2. Install the dependencies:

    npm install
    
  3. Build the web application:

    npm run build
    
  4. Start the web application:

    ../swupdate -w '-r ./dist -p 8080' -p 'echo reboot'
    
  5. Test the web application:

  6. Pack the web application (optional):

    npm run package -- --output swupdate-www.tar.gz
    

Contribute

Please run the linter before any commit

npm run lint