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

Installation

Serverless is a Node.js CLI tool, so the first thing you need is to install Node.js on your machine.

Go to the official Node.js website, download and follow the download description to install Node.js on your local machine.

You can verify whether the Node.js is installed successfully by running node --version in your terminal. If installed, you can see the corresponding Node.js version number printed out.

Installing the Serverless Framework

  1. Next, install the Serverless Framework via npm which was already installed when you installed Node.js.
  2. Open a terminal and type npm install -g serverless to install Serverless.

    npm install -g serverless

  3. Once the installation is done, you can verify whether Serverless is installed successfully by running the following command in your terminal:

    serverless
    To see which Serverless version of, run:
    serverless --version

Installing the FunctionGraph Plug-ins

To install the latest package from npm, run:
npm i --save serverless-huawei-functions

Setting up FunctionGraph

To run Serverless commands that issue requests to Huawei Cloud, you will need to set up your Huawei Cloud credentials For details, see credential settings