Can I deploy static resources in Function Compute?

Updated at:

Yes. Package your static files — such as HTML, CSS, and JavaScript — into a code package and serve them using a web server such as Nginx. Function Compute provides Nginx sample code to get you started quickly.

Deploy a static site with Nginx

  1. In the Function Compute console, create a new function.

  2. For the function type, select Web Function.

  3. In the runtime settings, choose the Nginx sample code.

  4. Upload your code package, which includes your HTML, CSS, and JavaScript files together with the Nginx configuration.