Serverless, as translated in Chinese, is called Serverless. What kind of form or product is this? No server, is there really no server? In fact, in the industry, Serverless is currently interpreted in several ways: in some scenarios, it can be interpreted as a software system architecture approach, often referred to as the Serverless architecture; In some cases, it can represent a product form, called a Serverless product.

1. Play content

  1. How to develop a Serverless project locally?
  2. How do I debug Serverless functions locally?
  3. Can logs printed during development be easily retrieved and used for debugging?
  4. How to ensure consistency between the local environment and the cloud environment?
  5. How do you publish multiple functions to the cloud at once?

First of all, there are many applications using Serverless in the small program scenario, and Serverless is particularly suited to lightweight, fast-changing apis. Such as the Internet of Things, small applications, switches, baffle services and other application scenarios. Not suitable for complex business, upstream and downstream systems rely on a lot of applications.

2. Get started

2.1 Plug-in Installation

Marketplace.visualstudio.com/items?itemN…

console.cloud.tencent.com/cam/capi

2.2 debugging

Test cloud function

Local Node Tests

2.3 Upload Function

You may encounter problems:

The problem description is very clear. Look at this:

The Runtime has to be both local and cloud to work, so I can’t use Node10 here

[INFO]YAML {
  keyword: 'enum',
  dataPath: ".Resources['default']['add'].Properties.Runtime",
  schemaPath: '#/properties/Resources/additionalProperties/oneOf/0/additionalProperties/oneOf/0/properties/Properties/properties/Runti me/enum',
  params: {
    allowedValues: [
      'Python2.7'.'Python3.6'.'Nodejs6.10'.'Nodejs8.9'.'Php5'.'Php7'.'Go1'.'Java8'.'python2.7'.'python3.6'.'nodejs6.10'.'nodejs8.9'.'php5'.'php7'.'go1'.'java8',
      [length]: 16
    ]
  },
  message: 'should be equal to one of the allowed values'
}
Copy the code

2.4 test

Authentication mode: No authentication is required and can be configured in triggers

2.5 Using Postman Tests

Restful calls are supported.

Content-type: support X-www-form-urlencoded and Application/JSON; Raw = Application /json in Postman.

Implement an ACL function

TODO

  • How do I use the database?
  • How do I invoke other services?
  • Serverless. Ink/Application Guide
  • How to integrate with existing business?
  • Node development is really convenient

other

Tencent Developer Community

Github.com/serverless/…

Console.cloud.tencent.com/scf/list-de…

Serverless.cloud.tencent.com/instances/w…

Developers.weixin.qq.com/miniprogram…

www.sohu.com/a/340102558…