Skip to content

Commit

Permalink
Promote Node.js compat (#16918)
Browse files Browse the repository at this point in the history
* Add/Edit two lines to promote Node.js compat

* Apply suggestions from code review

Co-authored-by: Kody Jackson <[email protected]>

* Updated all with compat date and flag

---------

Co-authored-by: Kody Jackson <[email protected]>
  • Loading branch information
ToriLindsay and kodster28 authored Oct 3, 2024
1 parent f2b9f13 commit 43840fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/content/docs/pages/functions/get-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Refer to [Routing](/pages/functions/routing/) for more information on route cust

### Runtime features

Workers runtime features, including compatibility with a subset of Node.js APIs and setting a [compatibility date or compatibility flag](/workers/configuration/compatibility-dates/) are configurable on Pages Functions.
[Workers runtime features](/workers/runtime-apis/) are configurable on Pages Functions, including [compatibility with a subset of Node.js APIs](/workers/runtime-apis/nodejs) and the ability to set a [compatibility date or compatibility flag](/workers/configuration/compatibility-dates/).

Set these configurations by passing an argument to your [Wrangler](/workers/wrangler/commands/#dev-1) command or by setting them in the dashboard. To set Pages compatibility flags in the Cloudflare dashboard:

Expand All @@ -65,7 +65,7 @@ After you have set up your Function, deploy your Pages project. Deploy your proj

:::caution

[Direct Upload](/pages/get-started/direct-upload/) from the Cloudflare dashboard is currently not supported with Functions.
[Direct Upload](/pages/get-started/direct-upload/) from the Cloudflare dashboard is currently not supported with Functions.
:::

## Related resources
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/pages/functions/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar:

import { DirectoryListing } from "~/components"

Pages Functions allows you to build full-stack applications by executing code on the Cloudflare network with [Cloudflare Workers](/workers/). With Functions, you can introduce application aspects such as authenticating, handling form submissions, or working with middleware. Use Functions to deploy server-side code to enable dynamic functionality without running a dedicated server.
Pages Functions allows you to build full-stack applications by executing code on the Cloudflare network with [Cloudflare Workers](/workers/). With Functions, you can introduce application aspects such as authenticating, handling form submissions, or working with middleware. [Workers runtime features](/workers/runtime-apis/) are configurable on Pages Functions, including [compatibility with a subset of Node.js APIs](/workers/runtime-apis/nodejs) and the ability to set a [compatibility date or compatibility flag](/workers/configuration/compatibility-dates/). Use Functions to deploy server-side code to enable dynamic functionality without running a dedicated server.

To feedback or ask questions on Functions, join the [Cloudflare Developers Discord](https://discord.com/invite/cloudflaredev) and connect with the Cloudflare team in the [#functions channel](https://discord.com/channels/595317990191398933/910978223968518144).

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/workers/runtime-apis/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ import { DirectoryListing } from "~/components";

The Workers runtime is designed to be [JavaScript standards compliant](https://ecma-international.org/publications-and-standards/standards/ecma-262/) and web-interoperable. Wherever possible, it uses web platform APIs, so that code can be reused across client and server, as well as across [WinterCG](https://wintercg.org/) JavaScript runtimes.

The Workers runtime also implements [a subset of Node.js APIs](/workers/runtime-apis/nodejs/) as an optional, opt-in compatibility layer.
[Workers runtime features](/workers/runtime-apis/) are [compatible with a subset of Node.js APIs](/workers/runtime-apis/nodejs) and the ability to set a [compatibility date or compatibility flag](/workers/configuration/compatibility-dates/).

<DirectoryListing />

0 comments on commit 43840fa

Please sign in to comment.