Serverless Web IDE is an IDE for functions launched by Tencent Cloud Serverless in partnership with CODING based on CloudStudio, an integrated development environment for browsers. It delivers an on-cloud development experience comparable to native IDEs.
Serverless Web IDE supports:
- We will keep the personalized configuration and code status in Serverless Web IDE for you. To ensure that function modifications will take effect, deploy the modifications to the cloud in a timely manner.
- We recommend you use the latest version of Google Chrome to get the best IDE user experience.
This document describes the Serverless Web IDE tool in detail as shown below in order from left to right:
In Serverless Web IDE, you can edit, deploy, and test function code. Common operations such as function testing and deployment and testing template selection are configured in the operation section in the top-right corner of the IDE as shown below:
Serverless Web IDE enables you to deploy a function either manually or automatically and to install dependencies online.
package.jsonwhen the function is deployed. For more information, see Online Dependency Installation.
- The root directory of the function is
/src, and the deployment operation will package and upload the files in the
/srcdirectory by default. Place the files that you want to deploy to the cloud in the
- In automatic deployment mode, you can trigger function deployment to the cloud by saving the function. Therefore, we recommend you not enable automatic deployment for functions with traffic.
You can switch between manual and automatic deployment and enable/disable online dependency installation by selecting from the drop-down list in the operation section in the top-right corner of the IDE. Automatic Deployment: Disabled indicates the manual deployment mode.
You can click Test in the operation section in the top-right corner of the IDE to trigger the function and view the result in the output.
scf\_test\_eventfolder in the
/srcroot directory of the function and deployed to the cloud with the function as shown below:
You can view the function testing result in the output, including the returned data
Response, the log
Output, and the function execution summary
In addition to operations such as function deployment and testing as well as testing template adding, the list expanded by right-clicking the function file in the Resource Manager contains all operations related to the function, including:
serverless.yml: You can write the current configuration of the function into the
serverless.ymlconfiguration file and use the Serverless Framework command line tool for further development;
The common commands, runtime environments, and preset extensions in Serverless Web IDE and their versions are as listed below:
`python3` follows the latest Python 3 version by default.
The `node` command follows the latest Node.js version by default. Node.js 14.18, 12.16, and 10.15 are also installed in the environment. You can run the `n` command in the terminal to switch the version.
|pip3||pip 22.0.4 (Python 3.7)|
|pip37||pip 22.0.4 (Python 3.7)|
|pip36||pip 21.3.1 (Python 3.6)|
|pip||pip 20.3.4 (Python 2.7)|
|Zip and unzip||6|
|Serverless Framework CLI||3.2.1|
|Node.js||16.13, 14.18, 12.16, and 10.15|
|Python||3.7, 3.6, and 2.7|
|PHP||8.0, 7.4, 7.2, and 5.6|
Performing the following operations in the IDE may cause security risks such as data leakage. If you have to perform them, do so with caution:
If IDE cannot be normally started due to a workspace exception, you can click Having problems? in the top-right corner of the IDE and click Reset Workspace on the pop-up page to initialize the workspace.
The online IDE terminal and the SCF cloud runtime environment are independent of each other. The execution result returned after you click Test is the actual execution result of the function.
If you run a dependent package installation command, make sure that you run it under the
Check the command version before running a command. For the commands supported by default, see Common commands.