> ## Documentation Index
> Fetch the complete documentation index at: https://help.dingtalk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction to Cloud Development

> The Cloud Development Platform is a cloud-based R&D workspace that Alibaba Cloud provides for developers. With the Cloud Development Platform, you can quickly develop and deploy DingTalk mini programs and H5 micro apps online. The browser-based CloudIDE comes with built-in environments for common languages such as Node.js, Java, PHP, and Python, sparing you complex configuration work. Focus only on business logic development and enter the development state at zero cost by simply opening your browser. In addition, you do not need to

## Introduction

The [Cloud Development Platform](https://workbench.aliyun.com/page/quickstart) is a cloud-based R\&D workspace that Alibaba Cloud provides for developers. With the Cloud Development Platform, you can quickly develop and deploy DingTalk mini programs and H5 micro apps online. The browser-based **CloudIDE** comes with built-in environments for common languages such as Node.js, Java, PHP, and Python, sparing you complex configuration work. Focus only on business logic development and enter the development state at **zero cost** by simply opening your browser. In addition, you do not need to purchase and deploy traditional servers. With the services provided by the Alibaba Cloud Serverless product line, you achieve truly maintenance-free operation and pay-per-call billing, greatly reducing deployment and operations costs.

The Cloud Development Platform provides two DingTalk app templates. With these two app templates, you can quickly create and try out DingTalk apps.

* [DingTalk Room Reservation](https://developers.dingtalk.com/document/tutorial/quickly-build-h5-microapplications-meeting-room-reservation)
* [DingTalk Lottery Mini Program](https://developers.dingtalk.com/document/tutorial/dingtalk-lottery-applet)

### Prerequisites

Before you use an app template to develop a DingTalk app, complete the following prerequisites:

* You have registered and activated your DingTalk developer account and hold Sub Admin and developer permissions. If you have not, see [Become a DingTalk Developer](https://developers.dingtalk.com/document/app/become-a-dingtalk-developer#topic-2024337).
* You have an Alibaba Cloud account and have completed real-name authentication. If you have not, see [Sign Up for an Alibaba Cloud Account](https://account.aliyun.com/register/register.htm).

## Create a DingTalk App

In this section, you create an H5 micro app in the Developer Console.

1. Sign in to the [DingTalk Developer Console](https://open-dev.dingtalk.com/).

   **Note**

   Only Admins and Sub Admins can sign in to the Developer Console.
2. On the **Developer Console** page, select **Internal App Development**, and then click **Create App**.
3. On the Create App page that appears, select the type of app you want to create, fill in the basic information, and select Self-service Development by Organization as the development method. Then click Confirm to create the app.
4. After the app is created, on the **Basic Information** page, copy the app's **AgentId**, **AppKey**, and **AppSecret** for later use.

## Create a Cloud App

In this section, you use the Cloud Development Platform to create a backend cloud app.

1. Sign in to the [Cloud Development Platform](https://workbench.aliyun.com/page/quickstart) with your Alibaba Cloud account.
2. Create a team based on the following information.

   Enter your organization or team name, and then click **Complete Creation**.
3. On the **App Management** page, click **Create App** in the upper-right corner.
4. Complete the app creation as follows.

   1. On the Create App page, click **Accept Authorization** to complete cloud resource access authorization, and then click **Next**.
   2. Configure the app creation method based on the following information, and then click **Next**.

      * Development language: You can select a development language to create a brand-new app. Java, NodeJS, Python, and PHP are currently supported.
      * Creation method: The Cloud Development Platform currently provides two creation methods.

        * Create directly
        * Create from a template
      * Template source: The Cloud Development Platform provides many app templates. You can select an app template to create an app that already contains the template code. Among them, "**DingTalk Room Reservation**" and "**DingTalk Lottery Mini Program**" are two templates designed specifically for DingTalk apps. Creating an app from a template greatly reduces your development workload.
   3. Fill in the basic app information, and then click **Next**.

      The Cloud Development Platform provides three compute services:

      * **Function Compute (FC)**: Function-based Serverless that supports pay-per-call billing and lets you start projects at zero cost. Elastic instances provide a certain amount of free quota.
      * **SAE Compute Service**: An application-oriented Serverless compute service that provides complete PaaS ecosystem capabilities at the application layer. With pay-as-you-go billing and low-barrier microservice migration to the cloud, it perfectly combines Serverless architecture with microservice architecture.
      * **ASK Compute Service**: A container-oriented Serverless compute service that requires no cluster node maintenance or capacity planning and charges on demand based on the configured container specifications. ASK clusters provide comprehensive Kubernetes compatibility while lowering the barrier to using Kubernetes, so you can focus more on your applications instead of managing the underlying infrastructure.
   4. Click **Complete** to finish creating the app.

      **Note**

      If the cloud services you depend on are not yet enabled, click **Enable Now** for each of them to enable these cloud services.

## Develop the Cloud App

After the app is created, you can start developing it.

1. Click **Online Development and Deployment** in the upper-right corner to open CloudIDE.

   **Note**

   Opening CloudIDE takes about 3 minutes. Please wait patiently.
2. After CloudIDE starts, it automatically loads the app's code. In the initial state, the loaded code is the default code files provided by the app template you selected when creating the app. Now you can start your app development work.

## Configure the Cloud App

The Cloud Development Platform provides three consistent Serverless environments—**Test Environment (TEST)**, **Staging Environment (PRE)**, and **Production Environment (RELEASE)**—and supports configuring each environment accordingly. In the "**App Management**" -> "**App Details**" -> "**Development and Deployment**" tab, you can select the corresponding environment for **app configuration**.

1. On the **Development and Deployment** page, select the **environment**, and then click **Deployment Configuration** in the Action column to view the current app's deployment configuration.

   You can use the default configuration provided by the Cloud Development Platform, or select a custom deployment environment configuration based on your development needs.
2. On the **Development and Deployment** page, select the **environment**, and then click **App Configuration** in the Action column.

   Click **Edit** to paste or enter multiple `KEY=VALUE` pairs at once. For how to obtain common app configurations, see the [Cloud Development documentation](https://help.aliyun.com/document_detail/177083.html?#h1-u5E38u89C1u7684u5E94u7528u914Du7F6Eu83B7u53D6u529Eu6CD53).

   For how to obtain common DingTalk app parameters, see [DingTalk Open Platform Basic Concepts](https://developers.dingtalk.com/document/app/basic-concepts/title-wxx-amg-62k#title-wxx-amg-62k).

   **Note**

   Database, file storage, and general middleware services should be enabled and configured into your project as needed by the app to provide access services to your business code. The Cloud Development Platform does not consume these service configurations.

## Deploy the Cloud App

1. After the app configuration is complete, click **Online Development and Deployment** to open **CloudIDE**.
2. Click **Deploy**, select the environment to deploy, and then click **Deploy**.

   **Note**

   The entire deployment process takes about 5 minutes. Please wait patiently.

   After deployment is complete for the Test and Staging environments, the Cloud Development Platform allocates a free temporary domain for testing.
3. Bind a custom domain.

   If you need to bind your own domain, refer to the following steps.

   1. After deployment succeeds, return to the **App Details** page > **Development and Deployment**, and click **Domain Configuration** after the corresponding environment. You can see the domain bound to the app. Copy the **API Gateway Domain**, that is, the **CNAME address**.
   2. Sign in to the [Alibaba Cloud DNS Console](https://dns.console.aliyun.com/?spm=a2c4g.11186623.2.12.3b9859cbIuhfCy#/dns/domainList). On the **Domain Resolution** page, click the **domain** to enter the **Resolution Settings** page.
   3. Click Add Record, and then add a record based on the following information.

      * **Record Type**: Select CNAME.
      * **Host Record**: Enter the domain you want to create.
      * **Resolution Line**: Select your resolution line.
      * **Record Value**: Paste the **API Gateway Domain address** you copied earlier.
      * **TTL**: Keep the default value or set a value you consider appropriate.
   4. After the domain is configured, return to the **Cloud Development Platform**. On the **App Details** page > **Development and Deployment**, select the corresponding environment, click **Domain Configuration**, and then configure the domain you created.
   5. Enter CloudIDE, open the deployment testing plugin labeled **WB**, then select the corresponding environment, and click **Deploy**.

      After deployment succeeds, you can see the deployment success message in the **Output** panel on the right. In the highlighted area, you can see that the domain you just bound has been bound successfully, but the CNAME has not yet taken effect.

      Open the terminal on your computer and enter the domain you just bound. If you see a message similar to the following, the CNAME has taken effect.

      **Note**

      The time it takes to take effect depends on the TTL value you set when creating the domain resolution earlier. Please wait patiently.

## DingTalk App Configuration and Release

1. Mini program configuration.

   1. Open the mini program IDE tool, open the appconfig.js file, and change the app's domain to the temporary domain provided by the Cloud Development Platform when the app was deployed, or your bound custom domain.
   2. Sign in to the [Developer Console](https://open-dev.dingtalk.com/#/index), then click **Security Center** on the **App Details** page, and **Add an HTTP Security Domain**. Set the HTTP security domain to the **temporary domain** provided by the Cloud Development Platform when the app was deployed, or your bound **custom domain**.
2. H5 micro app configuration.

   1. Sign in to the [DingTalk Developer Console](https://open-dev.dingtalk.com/#/corph5), and click the H5 micro app you created. On the app details page, click **Development Management**, and then configure the following information.

      * Server egress IP: Enter 255.255.255.255.
      * App home page URL: Enter the temporary domain address generated after the app is deployed, or your bound custom domain address.
3. To release the app, see [Version Management and Release](https://developers.dingtalk.com/document/app/publish-orgapp).

## Related Tutorials

* DingTalk Room Reservation
* DingTalk Lottery Mini Program
