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. 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:
A QR code will pop up. Please scan it to authorize and start deployment. After successful deployment, SCF resources will be automatically created.
View function information
Run the following command to view the information of the deployed SCF resources:
Removing function
Run the following command to remove the deployed SCF resources:
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.
Was this page helpful?