May 27, 2021 A minimalist getting started manual for cloud development serverless
In general, we've developed html, css, js, and some media resources (such as pictures, videos) that need to be deployed to a static server. L ike what:
So, in general, we talk about static sites, that is, sites do not have dynamic content, that is, pure HTML, no dynamic requests. C loud development also provides static site hosting (services) that can:
Static site hosting requires the selection of "color:red; f ont-weight:bold; " The pay-as-you-go package can only be turned on."
Assuming you didn't select a pay-per-view plan earlier, you can choose to switch your environment to Pay-As-You-Go or re-create your environment, as shown in the following image:
For example, the current document site was uploaded by Vuepress, as follows:
Static site hosting provides a default domain name that can be set on the underlying configuration page for the home page and the 404 page.
A website can not be separated from dynamic data, but also can not be separated from static pages. T herefore, it is recommended to combine the way. Here's the picture.
The first way is to access the database and cloud storage in the cloud function, as mentioned in the previous chapter, and then request the HTTP service of the cloud function through Ajax in a static hosting.
The second way is to use the SDK on the cloud development side, request services such as databases and cloud storage directly, and not write cloud functions, and the entire site is full of front-end JavaScript code.
The third approach is a combination of the first and second approaches, triggered with the cloud function HTTP at the right time, with the end-side SDK at the right time, and then partnered with static site hosting, which is the cloud-based all-in-one development model.