Skip to content

Archive Trac demo app module

madscatt edited this page Jun 20, 2026 · 1 revision

Demo App Module

Legacy Trac archive page imported from demo_app_module. Source: https://genapp.rocks/wiki/wiki/demo_app_module. Review age, links, and examples before treating as current.

3. Demo GenApp Application

d. Modifying Demo Application

Modifying the Module

  • Edit {{{modules/penergy.json}}} file (with common editors like emacs, vi, nano, pico) and change one of the labels
    • EXAMPLE: let's modify the label for the mass input:
     {
            "role"       : "input"
            ,"id"         : "m"
            ,"label"      : "mass [kg]"                   <--- CHANGE from "mass [kg]" to "Mass in [kg]"
            ,"type"       : "float"
            ,"required"   : "true"
            ,"help"       : "Enter the mass in kilograms"
      }
- Note: It is recommended to run {{{check_json.pl}}} on the modified JSON file to make sure there are no syntax errors
check_json.pl penergy.json
  • Regenerate application
    • change to the base directory ({{{[path_to_the/demo]}}})
    • run "genapp" (type {{{genapp}}} and press enter in the command line)
  • take a look at the web-site
http://your-ip-address/demo
- Press "Simulate" on the left, then press "Energy" button. See the difference:

![demo_site_mass_labels.png](https://genapp.rocks/wiki/raw-attachment/wiki/demo_app_module/demo_site_mass_labels.png) 

Previous | Up | Next

Clone this wiki locally