Step 1. Create and Test blogArticle Function

Last updated: 2020-07-21 17:52:41

In this section, you will create a function to implement the API responses of a blog article.

  1. Log in to the SCF Console and select Function Service on the left sidebar.
  2. Select the Beijing region at the top of the "Function Service" page and click Create to enter the function creation page.
    Set the following parameter information and click Next as shown below:
    • Function Name: enter "blogArticle".
    • Runtime Environment: select "Python 3.6".
    • Creation Method: select Template function.
    • Fuzzy Search: enter "api_service" for search.
      Click View Details in the template to view related information in the pop-up "Template Details" window where you can also perform downloads.

      Note:

      The data structure for storing the article is saved and simulated by the testArticleInfo variable, which is usually read from the database or file in real applications.

  3. Keep the default configuration and click Complete to complete the function creation.

Was this page helpful?

Was this page helpful?

  • Not at all
  • Not very helpful
  • Somewhat helpful
  • Very helpful
  • Extremely helpful
Send Feedback
Help