Jiffy Execution Flags
Execution Flags
Jiffy requires a small number of flags to be specified at runtime.
- -m Inclusion of the -m flag instructs jiffy to build a new application using the specified model file. Jiffy expects a fully-qualified path to a model file to follow the -m flag. The -m and -mf flags are mutually exclusive.
- -mf Inclusion of the -mf flag instructs jiffy to read and process all model files contained in the specified folder. Jiffy expects a fully-qualified path to a model folder to follow the -mf flag. The model folder must contain one or more jiffy model files. Jiffy will read all of the model files from the specified location and use them to generate a single application. Entities and entity relationships may span model files as long as they are coherent. The -mf and -m flags are mutually exclusive.
- -p Inclusion of the -p flag is used to specify the target directory for the generated application source-code relative to $GOPATH/src. This is a throwback to the pre-module days of Go, where it was necessary to place all code under the $GOPATH/src folder. There are no plans to change this at the moment. Specification of the application target location and project name with the -p flag will result in the creation of a new project directory in the designated location under $GOPATH/src. See the examples below for more details.
- -rb Inclusion of the -rb flag instructs jiffy to use the specified number of bits when generating RSA keys. This flag is optional and defaults to 2048 if not specified.
Execution Examples
Application based on a single model file
This example Illustrates the use of the -m flag to instruct jiffy to generate a new application based on a single model file located in /tmp. The -p flag instructs jiffy to name the new application ‘mynewserviceapp’ and create it in the $GOPATH/src/github.com/footle.com/mynewserviceapp. Note that $GOPATH/src/github.com/footle.com must already exist in order for the generation to succeed.
jiffy -m /tmp/MyModel.json -p /github.com/footle.com/mynewserviceapp
Application based on several model files
This example Illustrates the use of the -mf flag to instruct jiffy to generate a new application based on a set of model files located in /tmp/MyModelFolder. The -p flag instructs jiffy to name the new application ‘mynewserviceapp’ and create it in the $GOPATH/src/github.com/footle.com/mynewserviceapp. Note that $GOPATH/src/github.com/footle.com must already exist in order for the generation to succeed.
jiffy -mf /tmp/MyModelFolder -p /github.com/footle.com/mynewserviceapp