This document describes how to create a function and test it with APIs in the console to implement API response for blog articles.
- Log in to the SCF console and select Function Service on the left sidebar.
- At the top of the Function Service page, select the Beijing region and click Create to enter the function creating page.
Set the following parameter information and click Next as shown below:
- Creation method: select Template.
- Fuzzy search: enter "APIService" and search.
Click Learn More in the template to view relevant information in the Template Details pop-up window, which can be downloaded.
- The function name is automatically generated by default and can be modified as needed. In Trigger Configuration, select Create Later as shown below:
- Click Complete to complete function creation.
Data structures of articles are saved and simulated by the
testArticleInfo variable here and are usually read from the database or file in real use cases.