Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

App File Structure

 

An JSA app that you create is distributed within a compressed file.

The Hello World sample app that is created when you set up your development environment is a basic template that you can use for your application. However, the application file structure can be more complex.

The following list outlines the layout of files and sub directories that you can add to the root directory of your app. It also outlines the required nomenclature for app files and sub directories:

  • <App Root Folder>--This is main directory for application filesapp/views.py

    The main entry point into the web app. app/templates

    An optional subdirectory that contains any Python Flask of Jinja templates that are required by the app. app/static

    An optional subdirectory that contains CSS, JavaScript, globalization, and other resource files.

    • css

    • js

    • resources

      The application_<LANG>.properties file is a Globalization resource bundle for the specified language code. Text strings for globalization are stored as key/value pairs in Java format properties files. If you configured text strings for globalization, they appear in JSA when the user sets their preferences for the relevant locale.

    manifest.json The application manifest description file.

    src_deps An optional directory that contains source dependencies.

    • pip

      Optional subdirectory that contains any extra Python libraries that the app requires.

    • rpms

      Optional subdirectory that contains any RPM dependencies that the app requires. RPMs must be CentOS 6.7 x86_64 compatible.

    • init

      Optional subdirectory that contains any dependencies that the app requires that are not RPMs or Python libraries.