App Load (gx load)

gx load [-hV] [-c[=<YAML config>]] [-H=<host>] [-p=<adminPort>] [-U=<updaterPort>] [<jarFiles>...]

gx load loads an app into Grainite. This command uses the YAML config file to parse application information and load it.

Parameters

1. JAR Files (Java only)

All JAR files containing action handlers for the application can be provided as parameters - gx load [<jar files>...].

Alternatively, the JAR files can be specified within the app config:

app.yaml
app_name: my_app
package_id: org.sample
# Location of jar file relative to this config file
jars: 
    - target/my_app-jar-with-dependencies.jar 
...

The paths to the JAR files in the config file are relative to the config file itself.

JAR files passed as parameters take precedence over JAR files specified in the config.

Options

1. --yes

Bypass confirmation prompt, never prompt.

If the application has been loaded previously, confirmation will be required to proceed with the deployment of the application. This flag will bypass the confirmation prompt.

2. --watch

Perform hot reload on code file change.

gx watches the code files for changes. If the code files have changed, gx will automatically load the new code files.

Note: gx only watches the following files for changes -

  1. Code files that are supplied via the application's YAML configuration file.

  2. Code files that are supplied to gx load at invocation time through the parameter.

As the app's YAML config is not watched, any changes made to the app.yaml will not automatically trigger a reload.

3. --force

Skip waiting until the application is idle.

This means the app will be upgraded even if events are being sent to the application and pending transactions may not complete.

This also bypasses the confirmation prompt, same as --yes.

Last updated