Page Contents
Important:
Before running this generator, you must create an application using the application generator.
Then you must run the command from the root directory of the application.
Synopsis
Adds a new remote method to an existing application.
$ [slc | apic] loopback:remote-method [options] [<modelName>] [<methodName>]
Options
-h, --help
Print the generator’s options and usage.
--skip-cache
Do not remember prompt answers. Default is false.
--skip-install
Do not automatically install dependencies. Default is false.
Arguments
All arguments are optional.
Argument | Description | Type |
---|---|---|
modelName | Name of the model | String |
methodName | Name of the remote method | String |
Interactive Prompts
The tool will prompt you for:
- Name of the model to which to add the remote method.
- Name of the remote method.
- Whether the method is static (or an instance method).
- Description of the method.
- One or more HTTP endpoints, with corresponding accept and return arguments and their types.