A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.netlify.com/build/functions/optional-configuration/ below:

Optional configuration for functions | Netlify Docs

This document describes optional configuration settings you can use for more control over how your functions are built, deployed, and executed.

Select your function language:

Netlify will access the functions directory during every build, preparing and deploying each supported code file as a function. The default directory is YOUR_BASE_DIRECTORY/netlify/functions. You can customize the directory using the Netlify UI or file-based configuration.

[functions]

directory = "my_functions"

Settings in netlify.toml override settings in the Netlify UI.

For both methods, the path is an absolute path relative to the site’s base directory in your repository. To help keep your site secure, make sure your functions directory is outside of your publish directory so that your source files aren’t deployed as part of your site.

This feature is available on Pro and Enterprise plans.

Netlify offers several AWS regions for deploying your serverless functions. You may want to customize the region for the following reasons:

By default, Netlify deploys functions for new sites to us-east-2 (Ohio). This is a common choice for many database providers, so this optimizes performance for most cases.

You can change the region through the Netlify UI to one of the following regions.

In addition to the above self-serve regions, the following regions are available through support-assisted configuration.

If you want your site to use one of the above regions, please contact support.

To configure your functions region through the Netlify UI:

  1. Go to Project configuration > Build & deploy > Continuous deployment > Functions region.
  2. Select Configure.
  3. Use the menu to select a new region.
  4. Confirm with Save.
  5. Redeploy your site to apply the new region configuration.

Old deploys will continue to use the region configuration from when they were deployed.

For granular control over which files are bundled in your executable function artifacts, use the netlify.toml properties external_node_modules and included_files. Visit the file-based configuration doc for details.

[functions]

# Flags "package-1" as an external node module for all functions.

external_node_modules = ["package-1"]

# Includes all Markdown files inside the "files/" directory.

included_files = ["files/*.md"]

For all Node.js functions deployed on or after May 15, 2023, the default functions runtime is based on the Node.js version used for the build. The Node.js version used for the build must be a valid AWS Lambda runtime for Node.js that isn’t set to be deprecated in the next two months.

If the build uses a version of Node.js that does not meet these conditions, then the functions runtime uses a fallback default version of Node.js 22.

You can override the default to any valid AWS Lambda runtime for Node.js that isn’t set to be deprecated in the next two months. Do so by completing the following steps.

  1. In the Netlify UI, set the environment variable AWS_LAMBDA_JS_RUNTIME to the desired version. For example, to use Node.js 20 for all future functions deployed, set the variable value to nodejs20.x.

  2. Redeploy your site to apply the new runtime version.

Note that this environment variable must be set using the Netlify UI, CLI, or API, and not with a Netlify configuration file (netlify.toml).

Netlify will access the functions directory during every build, preparing and deploying each supported code file as a function. The default directory is YOUR_BASE_DIRECTORY/netlify/functions. You can customize the directory using the Netlify UI or file-based configuration.

[functions]

directory = "my_functions"

Settings in netlify.toml override settings in the Netlify UI.

For both methods, the path is an absolute path relative to the site’s base directory in your repository. To help keep your site secure, make sure your functions directory is outside of your publish directory so that your source files aren’t deployed as part of your site.

This feature is available on Pro and Enterprise plans.

Netlify offers several AWS regions for deploying your serverless functions. You may want to customize the region for the following reasons:

By default, Netlify deploys functions for new sites to us-east-2 (Ohio). This is a common choice for many database providers, so this optimizes performance for most cases.

You can change the region through the Netlify UI to one of the following regions.

In addition to the above self-serve regions, the following regions are available through support-assisted configuration.

If you want your site to use one of the above regions, please contact support.

To configure your functions region through the Netlify UI:

  1. Go to Project configuration > Build & deploy > Continuous deployment > Functions region.
  2. Select Configure.
  3. Use the menu to select a new region.
  4. Confirm with Save.
  5. Redeploy your site to apply the new region configuration.

Old deploys will continue to use the region configuration from when they were deployed.

To optimize bundling time and artifact size, you can have Netlify use esbuild for bundling your JavaScript functions. Enable this opt-in beta feature in netlify.toml.

[functions]

node_bundler = "esbuild"

For granular control over which files are bundled in your executable function artifacts, use the netlify.toml properties external_node_modules and included_files. Visit the file-based configuration doc for details.

[functions]

# Flags "package-1" as an external node module for all functions.

external_node_modules = ["package-1"]

# Includes all Markdown files inside the "files/" directory.

included_files = ["files/*.md"]

For all Node.js functions deployed on or after May 15, 2023, the default functions runtime is based on the Node.js version used for the build. The Node.js version used for the build must be a valid AWS Lambda runtime for Node.js that isn’t set to be deprecated in the next two months.

If the build uses a version of Node.js that does not meet these conditions, then the functions runtime uses a fallback default version of Node.js 22.

You can override the default to any valid AWS Lambda runtime for Node.js that isn’t set to be deprecated in the next two months. Do so by completing the following steps.

  1. In the Netlify UI, set the environment variable AWS_LAMBDA_JS_RUNTIME to the desired version. For example, to use Node.js 20 for all future functions deployed, set the variable value to nodejs20.x.

  2. Redeploy your site to apply the new runtime version.

Note that this environment variable must be set using the Netlify UI, CLI, or API, and not with a Netlify configuration file (netlify.toml).

Netlify will access the functions directory during every build, preparing and deploying each supported code file as a function. The default directory is YOUR_BASE_DIRECTORY/netlify/functions. You can customize the directory using the Netlify UI or file-based configuration.

[functions]

directory = "my_functions"

Settings in netlify.toml override settings in the Netlify UI.

For both methods, the path is an absolute path relative to the site’s base directory in your repository. To help keep your site secure, make sure your functions directory is outside of your publish directory so that your source files aren’t deployed as part of your site.

This feature is available on Pro and Enterprise plans.

Netlify offers several AWS regions for deploying your serverless functions. You may want to customize the region for the following reasons:

By default, Netlify deploys functions for new sites to us-east-2 (Ohio). This is a common choice for many database providers, so this optimizes performance for most cases.

You can change the region through the Netlify UI to one of the following regions.

In addition to the above self-serve regions, the following regions are available through support-assisted configuration.

If you want your site to use one of the above regions, please contact support.

To configure your functions region through the Netlify UI:

  1. Go to Project configuration > Build & deploy > Continuous deployment > Functions region.
  2. Select Configure.
  3. Use the menu to select a new region.
  4. Confirm with Save.
  5. Redeploy your site to apply the new region configuration.

Old deploys will continue to use the region configuration from when they were deployed.

The Go version used in the deployment pipeline is determined by your site’s build image.

To modify the Go version used for your builds, change the build image for your site at Project configuration > Build & deploy > Continuous Deployment > Build image selection.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4