Serverless Cloud function SCF online editor without terminal? Common local development tools cannot be installed and used? Can’t view large files? The release of the Serverless Web IDE solves all of these problems for you.

Serverless Web IDE is an online IDE jointly launched by Tencent Cloud Serverless and CODING. It is based on Cloud Studio, an online integrated development environment independently developed by CODING team. It allows developers to write code anytime, anywhere in a browser, and has the same smooth editing experience as a native IDE without the hassle of configuration.

Login cloud function SCF console view function code immediately experience: console.cloud.tencent.com/scf/list?ri…

Functional advantages

  • Closed-loop function operation in IDE: In Serverless Web IDE, you can complete the whole process of function operation from development, deployment to testing, and get the immersive experience of online development;
  • Terminal capabilities: Serverless Web IDE provides terminal capabilities consistent with the local development experience, and preset common PIP, NPM, Git and other development tools and SCF has supported the programming language development environment;
  • Extensions: Common VS Code extensions are preinstalled, such as Python, ESLint, Prettier, etc. Online development can also get intelligent prompts, Code completion, etc.
  • Stateful: The Serverless Web IDE provides a workspace for each user that is isolated from each other, and the operations that take place in the workspace are reserved for you. Don’t worry if you exit the editor by mistake during editing. The next time you use the IDE, you can continue the work you left off last time. If you customize the configuration in the IDE, you can get a consistent IDE experience across different functions and at different times

Note:

  • We reserve the personalization and code state in the Serverless Web IDE for you. To ensure that the function changes take effect, please deploy the changes to the cloud in a timely manner.
  • Use the latest version of Google Chrome for the best IDE experience.

Rapid experience

The process for modifying, deploying, and testing a function in the Serverless Web IDE is as follows:

Online development

Log in to the SCF console for cloud functions and create a new function or open an existing one. This article uses a function named Serverless-web-ide as an example:

Try the Serverless Web IDE on the Function Code TAB

Function deployment:

Once the development is complete, you can click the Deploy button in the upper right corner of the IDE to deploy the function to the cloud. The Serverless Web IDE provides both manual and automatic deployment and supports online dependency installation.

1. Manual Deployment: In manual deployment mode, you can click the “Deploy” button in the upper right corner of the IDE to trigger the function to deploy to the cloud.

2. Automatic deployment: In automatic deployment mode, save (CTRL + S or Command +s) to trigger the function deployment to the cloud.

Online installation dependencies: Currently, only node. js operating environment is supported. After online installation dependency is enabled, dependencies will be automatically installed during function deployment according to the configuration in package.json. Details refer to rely on online installation: https://cloud.tencent.com/document/product/583/37920.

To switch the deployment mode and enable online dependent installation, click Automatic Deployment and Automatic Installation Dependency in the drop-down list of the arrow in the upper right corner of the IDE. Automatic Deployment: Off indicates manual deployment.

Note:

  • The root directory of the function is/SRC. By default, the files in the/SRC directory are packaged and uploaded. You need to save the files to be deployed to the cloud in the/SRC directory
  • In automatic deployment mode, functions are deployed to the cloud. You are not advised to enable this function on functions with traffic.

Function test

You can click the Test button in the upper right corner of the IDE to trigger the function to run and see the result of the function in the output.

1. Select test template: Click “Test Template” in IDE operation area to select function test trigger event;

2. Added test template: If the existing test template cannot meet your test requirements, you can customize test events by selecting “New Test Template” from the drop-down list of test templates. The new test events will be stored as JSON files in the SCF \_test\_event folder under the root directory/SRC of the function and deployed to the cloud together with the function. Already created test templates are automatically detected and added to the IDE test template list.

See the log

You can view function test results in the Output, including the return data Response, log Output, and function execution Summary.

More operations

All of the function-related operations are in the list that you can right-click on the Explorer function file to expand. In addition to deployment, testing, and adding test templates, it also provides:

  • Generate serverless. Yml: Write the current configuration of the function to the configuration file serverless.
  • Discard current changes: Re-pull functions already deployed in the cloud to overwrite the current workspace.

Tencent Cloud Serverless provides complete online development, online debugging full life cycle capabilities: “Goodbye, local environment! Tencent Cloud global launch: Serverless online remote debugging”

Any problems encountered during use can be reported here

One More Thing

Immediately experience Tencent Cloud Serverless Demo and receive Serverless new user package 👉 Serverless /start

Welcome to: Serverless Chinese!