Updated on 2023-11-22 GMT+08:00

Install

Install a service from a GitHub URL in the current working directory.
serverless install --url https://github.com/some/service

Options

  • --url or -u: The services GitHub URL, which is required.
  • --name or -n: Name for the service.

Examples

  • Install a service from a GitHub URL
    serverless install --url https://github.com/zy-linn/examples/tree/v3/legacy/huawei-nodejs

    This example will download the .zip file of the huawei-nodejs service from GitHub, create a new directory named huawei-nodejs in the current working directory, and unzip the file in this directory.

  • Install a service from a GitHub URL with a new service name
    serverless install --url https://github.com/zy-linn/examples/tree/v3/legacy/huawei-nodejs--name my-huawei-service

    The execution process is as follows:

    1. Download the .zip file of the huawei-nodejs service from GitHub.
    2. Create a new directory with the name my-huawei-service in the current working directory.
    3. Unzip the files in this directory.
    4. Rename the service to my-huawei-service if serverless.yml exists in the service root.
  • Install a service from a directory in a GitHub URL
    serverless install --url https://github.com/zy-linn/examples/tree/v3/legacy/huawei-nodejs

    In this example, the huawei-nodejs service will be downloaded from GitHub.