For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Deploying JavaScript adapters

You deploy a JavaScript adapter with Maven, or the MobileFirst Platform CLI.

Parent topic: Working with JavaScript adapters


Configuring the deploy goal


Overview

The deploy goal deploys the adapter file to the server. Before you deploy the adapter, ensure that the values in your pom.xml file that relate to the deploy goal are correct. For more information, see The deploy goal.


Deploying adapters with Maven


Before you begin

To work with Maven, ensure that you have it installed. For more information, see https://maven.apache.org/install.html.


Procedure

  1. At the command prompt, navigate to the root folder of the project.
  2. Run one of the following commands:

    • mvn adapter:deploy to deploy the adapter.
    • mvn install adapter:deploy to build and deploy the adapter.

    Note: The deploy command is available only during development.


Deploying adapters with MobileFirst Platform CLI


Before you begin

Ensure that you have installed MobileFirst Platform CLI and Maven.


Procedure

  1. At the command prompt, navigate to the root folder of the project.
  2. Run the mfpdev adapter deploy -x command to deploy the adapter.

    The -x option deploys the adapter to the MobileFirst Server that is specified in the pom.xml file of the adapter. If you leave out the option, CLI uses the default server that is specified in the CLI settings.

    Tip: We can also find and deploy all of the adapters that are in the current directory and its subdirectories by entering mfpdev adapter deploy all while you are in that directory.

    For more CLI deployment options, run the command: mfpdev help adapter deploy.

    Note: The deploy command is available only during development.


Deploying adapters with the MobileFirst Operations Console


Procedure

We can also deploy an adapter in the MobileFirst Operations Console by selecting Deploy Adapter in the Actions menu and following the instructions.