Cover by Dan Sanderson

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Configuring the Frontend

You control how the frontend routes requests for your application using configuration files. These files reside alongside your application’s code and static files in your application directory. When you upload your application, all of these files are uploaded together as a single logical unit.

Let’s take a look at how to configure the frontend for an application. First, we’ll look at the overall layout and syntax for the configuration files for a Python app and for a Java app. Then we’ll discuss each frontend feature, with examples for each runtime environment.

Configuring a Python App

A Python application consists of files, including Python code for request handlers and libraries, static files, and configuration files. On your computer, these files reside in the application root directory. Static files and application code may reside in the root directory or in subdirectories. Configuration files always reside in fixed locations in the root directory.

You configure the frontend for a Python application using a file named app.yaml in the application root directory. This file is in a format called YAML, a concise human-readable data format with support for nested structures like sequences and mappings.

Example 3-1 shows an example of a simple app.yaml file. We’ll discuss these features in the following sections. For now, notice a few things about the structure of the file:

  • The file is a mapping of values to names. For instance, the value python is associated with ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required