Getting Started¶
This section will help you build your own IoT Application on top of the Phenome Core Agent.
Clone An Existing App¶
It is easiest to start building an app by using an existing application. For example - pull the “sample_app” code from the Phenome Sample App repository Sample App
Setting Up Your App¶
Come up with a name for your APP: e.g. MyApp
Create a .JSON file in the config/meta directory (e.g. myapp.json). This will define the metadata in your app, the object, property, relation, data and thought models, etc.
To specific configuration settings in code, use the file config/default.py
If not putting settings in code, create an .INI file in the root directory of the app (e.g. myapp.ini).
To specify an alternate configuration at runtime, set an environment variable named APP_CONFIG_FILE in the shell script to the path of the .py file to load settings.
Example :
export APP_CONFIG_FILE={path}/my_config_file.py
Starting Your App¶
To run in “headless” mode (i.e. it will run in the background) execute the “run_headless.sh” script in the root of the directory.
The application can also be run by simply executing “run.sh”, but will not release control until you press CONTROL-C or kill the process from another window.