tencent cloud

フィードバック

Creating Function with Serverless Cloud Framework

最終更新日:2023-05-05 15:38:06

    Scenario

    This document describes how to use the SCF component provided by Serverless Cloud Framework to create and deploy an SCF project. For more information, see Components Overview.

    Prerequisites

    Install Serverless Cloud Framework. For more information, see Installation.
    Your account has the Serverless Framework permissions. For more information, see Permission Management.

    Directions

    Creating a function

    Run the following command to create a function in the Node.js language:
    scf init scf-nodejs --name example
    Note:
    scf-nodejs in the command can be replaced with a template for another programming language. SCF supports the following components: scf-golang, scf-nodejs, scf-php, and scf-python.

    Deploying the function

    Run the following command in the scf-demo directory to deploy the function:
    scf deploy
    A QR code will pop up. Please scan it to authorize and start deployment. After successful deployment, SCF resources will be automatically created.
    Note
    If authentication fails, authorize as instructed in Account and Permission Configuration.

    View function information

    Run the following command to view the information of the deployed SCF resources:
    scf info

    Removing function

    Run the following command to remove the deployed SCF resources:
    scf remove

    Relevant Features

    To use Serverless Cloud Framework to manipulate SCF functions, see **Serverless Cloud Framework Overview**.
    Serverless Web IDE is a browser-based integrated development environment. It delivers an on-cloud development experience comparable to native IDEs. For more information on its features for SCF, see Serverless Web IDE.
    The SCF SDK integrates function business flow APIs, which simplifies the invocation of functions. For more information on its feature for functions, see SDK for Python and Node.js SDK.
    お問い合わせ

    カスタマーサービスをご提供できるため、ぜひお気軽にお問い合わせくださいませ。

    テクニカルサポート

    さらにサポートが必要な場合は、サポートチケットを送信して弊社サポートチームにお問い合わせください。24時間365日のサポートをご提供します。

    電話サポート(24 時間365日対応)