handlers:# All URLs beginning with /stylesheets are treated as paths to# static files in the stylesheets/ directory.-url:/stylesheetsstatic_dir:stylesheets# ...
handlers:# All URLs ending in .gif .png or .jpg are treated as paths to# static files in the static/ directory. The URL pattern is a# regular expression, with a grouping that is inserted into the# path to the file.-url:/(.*\.(gif|png|jpg))$static_files:static/\1upload:static/.*\.(gif|png|jpg)$# ...
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-20。"],[[["\u003cp\u003eThe \u003ccode\u003eapp.yaml\u003c/code\u003e file is essential for configuring App Engine app settings, with at least a \u003ccode\u003eruntime\u003c/code\u003e entry required, and each service within the app has its own \u003ccode\u003eapp.yaml\u003c/code\u003e file.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eapp.yaml\u003c/code\u003e uses YAML format, supports comments with \u003ccode\u003e#\u003c/code\u003e, and employs POSIX extended regular expression syntax for URL and file path patterns.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ehandlers\u003c/code\u003e element in \u003ccode\u003eapp.yaml\u003c/code\u003e defines how App Engine handles URL patterns, whether by executing application code or serving static files, and patterns are evaluated in the order they appear.\u003c/p\u003e\n"],["\u003cp\u003eScaling within App Engine can be configured using \u003ccode\u003eautomatic_scaling\u003c/code\u003e, \u003ccode\u003ebasic_scaling\u003c/code\u003e, or \u003ccode\u003emanual_scaling\u003c/code\u003e elements in the \u003ccode\u003eapp.yaml\u003c/code\u003e, which dictate how instances are managed based on traffic and performance needs.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eREGION_ID\u003c/code\u003e is a code assigned by Google based on the selected region when creating an app and it is included in App Engine URLs for apps created after February 2020.\u003c/p\u003e\n"]]],[],null,["# App Engine app.yaml reference\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n### Region ID\n\nThe \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e is an abbreviated code that Google assigns\nbased on the region you select when you create your app. The code does not\ncorrespond to a country or province, even though some region IDs may appear\nsimilar to commonly used country and province codes. For apps created after\nFebruary 2020, \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e`.r` is included in\nApp Engine URLs. For existing apps created before this date, the\nregion ID is optional in the URL.\n\nLearn more\n[about region IDs](/appengine/docs/standard/python/how-requests-are-routed#region-id). \nOK \nGo Java Node.js PHP Python Ruby\n\nYou configure your App Engine app's settings in the `app.yaml`\nconfiguration file. Your config file must specify at least a [`runtime`](#runtime) entry.\n\nEach [service](/appengine/docs/an-overview-of-app-engine)\nin your app has its own `app.yaml` file, which acts as a descriptor for its\ndeployment. You must first create the `app.yaml` file for the `default` service\nbefore you can create and deploy `app.yaml` files for additional services within\nyour app. To learn more about structuring multiple services in your app, see\n[Structuring Web Services in App Engine](/appengine/docs/standard/configuration-files).\n\nSyntax\n------\n\nThe syntax of `app.yaml` is the [YAML format](http://www.yaml.org/).\n\nThe YAML format supports comments. A line that begins with a pound (`#`)\ncharacter is ignored: \n\n # This is a comment.\n\nURL and file path patterns use [POSIX extended regular expression\nsyntax](https://wikipedia.org/wiki/Regular_expression), excluding collating\nelements and collation classes. Back-references to grouped matches (e.g. `\\1`)\nare supported, as are these Perl extensions: `\\w \\W \\s \\S \\d \\D`.\n\nExample\n-------\n\nThe following is an example of an `app.yaml` file:\n\n\u003cbr /\u003e\n\n### Runtime and app elements\n\n### Handlers element\n\nThe `handlers` element provides a list of URL\npatterns and descriptions of how they should be handled. App Engine can\nhandle URLs by executing application code, or by serving static files uploaded\nwith the code, such as images, CSS, or JavaScript.\n\nPatterns are evaluated in the order they appear in the `app.yaml` file, from\ntop to bottom. The first mapping whose pattern matches the URL is the one used\nto handle the request.\n\nThe following table lists the subelements of the `handlers` element that control\nthe behavior for static files, static directories, scripts in runtimes other\nthan Node.js, and other settings.\n\n### Scaling elements\n\nThe elements in following table configure how your application scales. If no\nscaling type is specified, then automatic scaling is set by default.\n\nTo learn more about how App Engine apps scale, see\n[Scaling types](/appengine/docs/standard/how-instances-are-managed#scaling_types)."]]