fbpx

project.yml Reference

project.yml Reference

Every project must have a configuration file called project.yml. This document will cover all the options that are configurable via this file.

Configuration keys

project

Top level key

Required: yes

This it the configuration top level key. All the other keys must be under the project key.


name

Required: yes
Parent: project
Type: String
Valid characters: letters, numbers, dashes and underscores. It cannot start with a dash.
Minimum length: 3 characters

The project name.

Example:

name: myproject

identifier

Required: yes
Parent: project
Type: String
Valid characters: letters, numbers, dashes and underscores.
Minimum length: 3 characters

The project identifier is used to ensure your workspaces will have unique names. While it is not a secret, it is important you don't lose it.

Example:

identifier: 32d5fe

public_dir

Required: yes
Parent: project
Type: String
Default: public

The public directory is where you put static files. Files will be served from there first, meaning that if you have a function at functions/product and a folder public/product, the public one will take precedence.

Example:

public_dir: public

functions_dir

Required: yes
Parent: project
Type: String
Default: functions

The name of the folder containing the project's functions.

Example:

functions_dir: functions

root_to

Required: yes
Parent: project
Type: String
Default: root

The name of the function that will respond to requests made to the domain's root path.

Example:

root_to: root

catch_all

Required: yes
Parent: project
Type: String
Default: catch-all

Allows you to capture requests to non-existing functions or assets and send them to another function. This is useful for setting custom 404 pages, for example.

Example:

catch_all: catch-all