Skip to content
This repository was archived by the owner on Apr 15, 2021. It is now read-only.

Commit 7a500ae

Browse files
committed
Replace 'The XDN'
1 parent acc535b commit 7a500ae

19 files changed

+46
-46
lines changed

guides/caching.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The `cache` function can be used in the same route as other functions such as `s
5959
- Value of `accept-encoding` request header
6060
- Name of the destination when [split testing](./split_testing) is in effect
6161

62-
When [POST and other non-GET/HEAD](#section_caching_responses_for_post_and_other_non_get_head_requests) methods caching is enabled XDN automatically adds the following to the cache key:
62+
When [POST and other non-GET/HEAD](#section_caching_responses_for_post_and_other_non_get_head_requests) methods caching is enabled, {{ PRODUCT_NAME }} automatically adds the following to the cache key:
6363

6464
- Request HTTP method
6565
- Request body
@@ -145,7 +145,7 @@ This will automatically add request method and body to the caching key.
145145
There are a number of limitations in caching of `POST` and similar requests:
146146

147147
1. If the request body is longer than 8,000 bytes, the caching will automatically be turned off.
148-
2. Since both mutating and non-mutating requests are executed on the same route, there is no way for XDN to distinguish between such operations and the responsibility for never caching the mutating requests lies with you as the developer. The way to avoid caching responses to mutating requests is to inject `private` into `cache-control` of your response (e.g. `res.setHeader('cache-control', 'private')`)
148+
2. Since both mutating and non-mutating requests are executed on the same route, there is no way for {{ PRODUCT_NAME }} to distinguish between such operations and the responsibility for never caching the mutating requests lies with you as the developer. The way to avoid caching responses to mutating requests is to inject `private` into `cache-control` of your response (e.g. `res.setHeader('cache-control', 'private')`)
149149
3. Multiple requests are often need to "warm" the cache for non-`GET` requests.
150150

151151
### Caching Private Responses
@@ -299,7 +299,7 @@ If you have [static prerendering] enabled, the cache will automatically be repop
299299

300300
## Preserving the cache when deploying a new version of your site
301301

302-
By default, XDN clears your environment edge cache on every time you deploy a new version of your site.
302+
By default, {{ PRODUCT_NAME }} clears your environment edge cache on every time you deploy a new version of your site.
303303

304304
This behavior can be turned off by editing your [Environment](environment) config and enabling the following option:
305305

@@ -312,7 +312,7 @@ After activating that new environment version, future deploys will re-use the ex
312312
In order to ensure that users who are actively browsing your site do not experience issues during a deployment, developers can
313313
configure certain client-side assets to be permanently available, even after a new version of the site has been deployed. For example,
314314
browsers using on an old version of the site may continue to request JavaScript chunks for the old version of the site for some time after a new
315-
version is deployed. The XDN automatically makes client-side scripts permanently available if you use Next.js, Nuxt.js, Angular, or Sapper.
315+
version is deployed. {{ PRODUCT_NAME }} automatically makes client-side scripts permanently available if you use Next.js, Nuxt.js, Angular, or Sapper.
316316

317317
If you are using another framework or would like to make sure a particular asset is permanently available, you can do so by setting the `permanent` option in `serveStatic`. For example:
318318

@@ -343,11 +343,11 @@ These scripts assume that you have created environments called "production", "st
343343
```js
344344
"scripts": {
345345
...
346-
"clearcache:dev": "xdn cache-clear --team=myTeam --site=myXDNApp --environment=development --token=$xdn_deploy_token",
347-
"clearcache:stage": "xdn cache-clear --team=myTeam --site=myXDNApp --environment=staging --token=$xdn_deploy_token",
348-
"clearcache:prod": "xdn cache-clear --team=myTeam --site=myXDNApp --environment=production --token=$xdn_deploy_token",
349-
"clearcache:prod:pdps": "xdn cache-clear --team=myTeam --site=myXDNApp --environment=production --surrogate-key=pdp --token=$xdn_deploy_token",
350-
"clearcache:prod:plps": "xdn cache-clear --team=myTeam --site=myXDNApp --environment=production --surrogate-key=plp --token=$xdn_deploy_token",
346+
"clearcache:dev": "xdn cache-clear --team=myTeam --site=my{{ PRODUCT_NAME }}App --environment=development --token=$xdn_deploy_token",
347+
"clearcache:stage": "xdn cache-clear --team=myTeam --site=my{{ PRODUCT_NAME }}App --environment=staging --token=$xdn_deploy_token",
348+
"clearcache:prod": "xdn cache-clear --team=myTeam --site=my{{ PRODUCT_NAME }}App --environment=production --token=$xdn_deploy_token",
349+
"clearcache:prod:pdps": "xdn cache-clear --team=myTeam --site=my{{ PRODUCT_NAME }}App --environment=production --surrogate-key=pdp --token=$xdn_deploy_token",
350+
"clearcache:prod:plps": "xdn cache-clear --team=myTeam --site=my{{ PRODUCT_NAME }}App --environment=production --surrogate-key=plp --token=$xdn_deploy_token",
351351
...
352352
},
353353
```

guides/connectors.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Connector packages help build and run your app within {{ PRODUCT_NAME }}. When y
44

55
## Writing a connector
66

7-
An XDN connector consists of four entry points:
7+
A {{ PRODUCT_NAME }} connector consists of four entry points:
88

99
- `init.js` - Called when the user runs `xdn init`, adding resources to the project necessary for deploying on {{ PRODUCT_NAME }}. May also modify existing files with the project.
1010
- `dev.js` - Called when the user runs `xdn dev` to run their app in development mode.
@@ -106,7 +106,7 @@ export default async function build({ skipFramework }) {
106106
try {
107107
await builder.exec('npx sapper build')
108108
} catch (e) {
109-
// this lets the user know that the build error was within their application code, not their XDN router or configuration.
109+
// this lets the user know that the build error was within their application code, not their {{ PRODUCT_NAME }} router or configuration.
110110
throw new FrameworkBuildError('Sapper')
111111
}
112112
}
@@ -122,7 +122,7 @@ export default async function build({ skipFramework }) {
122122

123123
## prod.js
124124

125-
The XDN runs your application in its serverless cloud by proxying requests to your framework's application server, which it expects to be running on a specific port. The prod.js entry point exports a function that is called when a new serverless function is provisioned. It is responsible for starting your app on the provided port so that it can receive requests from {{ PRODUCT_NAME }}.
125+
{{ PRODUCT_NAME }} runs your application in its serverless cloud by proxying requests to your framework's application server, which it expects to be running on a specific port. The prod.js entry point exports a function that is called when a new serverless function is provisioned. It is responsible for starting your app on the provided port so that it can receive requests from {{ PRODUCT_NAME }}.
126126

127127
_Optional. This entry point is only needed if your app uses server-side rendering or calls the_ [renderWithApp](/docs/api/core/classes/_router_responsewriter_.responsewriter.html#renderwithapp) _method on ResponseWriter._
128128

guides/contributing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to developer.moovweb.com
22

3-
The XDN is all about putting power in the hands of developers and our documentation is no different. The source code for the {{ PRODUCT_NAME }} developer docs (i.e. this site your reading now) is in an open [repository on Github](https://github.com/moovweb-docs/xdn-docs) and we welcome feedback and pull requests. If you've found a typo or a better way to explain something, please submit a pull request or a file issue! Others will likely stumble over the same problem and benefit from your insight.
3+
{{ PRODUCT_NAME }} is all about putting power in the hands of developers and our documentation is no different. The source code for the {{ PRODUCT_NAME }} developer docs (i.e. this site your reading now) is in an open [repository on Github](https://github.com/moovweb-docs/xdn-docs) and we welcome feedback and pull requests. If you've found a typo or a better way to explain something, please submit a pull request or a file issue! Others will likely stumble over the same problem and benefit from your insight.
44

55
## Running locally
66

@@ -27,7 +27,7 @@ Finally, visit the site in your browser at http://127.0.0.1:3000.
2727

2828
## Architecture
2929

30-
The XDN docs are a simple Next.js application running on {{ PRODUCT_NAME }} (yes we [dogfood](https://en.wikipedia.org/wiki/Eating_your_own_dog_food)). The content is stored as pages called "guides". Each guide is a Markdown file located in the [guides folder](https://github.com/moovweb-docs/xdn-docs/tree/master/guides) and the [guides.json](https://github.com/moovweb-docs/xdn-docs/blob/master/guides/guides.json) controls the navigation menu for reaching the guides.
30+
{{ PRODUCT_NAME }} docs are a simple Next.js application running on {{ PRODUCT_NAME }} (yes we [dogfood](https://en.wikipedia.org/wiki/Eating_your_own_dog_food)). The content is stored as pages called "guides". Each guide is a Markdown file located in the [guides folder](https://github.com/moovweb-docs/xdn-docs/tree/master/guides) and the [guides.json](https://github.com/moovweb-docs/xdn-docs/blob/master/guides/guides.json) controls the navigation menu for reaching the guides.
3131

3232
## How to contribute
3333

guides/devtools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Devtools
22

3-
The XDN Devtools is a widget that helps developers understand how their site interacts with {{ PRODUCT_NAME }}, including:
3+
{{ PRODUCT_NAME }} Devtools is a widget that helps developers understand how their site interacts with {{ PRODUCT_NAME }}, including:
44

55
- Edge and browser caching
66
- Prefetching

guides/logs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Logs
22

3-
The XDN platform exposes three types of logs to users:
3+
The {{ PRODUCT_NAME }} platform exposes three types of logs to users:
44

55
- [Build logs](#section_build_logs) capture all the build output from your XDN deploys.
66
- [Server logs](#section_server_logs) capture your XDN serverless console output at real time.

guides/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ To upgrade your project to XDN v2, run `xdn use latest`. XDN v2 introduces the f
66

77
### Path syntax change
88

9-
The syntax for capturing multiple path tokens has been changed from `*variable` to `:variable*`. The XDN now uses [path-to-regexp](https://github.com/pillarjs/path-to-regexp) for route path matching, which is the same library used by express.
9+
The syntax for capturing multiple path tokens has been changed from `*variable` to `:variable*`. {{ PRODUCT_NAME }} now uses [path-to-regexp](https://github.com/pillarjs/path-to-regexp) for route path matching, which is the same library used by express.
1010

1111
### Custom cache keys
1212

guides/next.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ Note that if you don't provide a `url` prop to `Prefetch`, you must specify the
165165

166166
## Routing
167167

168-
The XDN supports Next.js's built-in routing scheme for both page and api routes, including Next.js 9's clean dynamic routes. The default `routes.js` file created by `xdn init` sends all requests to Next.js via a fallback route:
168+
{{ PRODUCT_NAME }} supports Next.js's built-in routing scheme for both page and api routes, including Next.js 9's clean dynamic routes. The default `routes.js` file created by `xdn init` sends all requests to Next.js via a fallback route:
169169

170170
```js
171171
// This file was automatically added by xdn deploy.
@@ -255,7 +255,7 @@ module.exports = new Router()
255255

256256
### Dynamic Fallback Route
257257

258-
Usually Next.js requires 404.js to be a static page. The XDN enables you to render a specific page when no other route is matched using `router.fallback`:
258+
Usually Next.js requires 404.js to be a static page. {{ PRODUCT_NAME }} enables you to render a specific page when no other route is matched using `router.fallback`:
259259

260260
```js
261261
const { Router } = require('{{ PACKAGE_NAME }}/core/router')

guides/nuxt.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Doing so will exclude these modules from your production deployment and keep the
147147
## Routing
148148

149149
The next few sections of this guide explain how {{ PRODUCT_NAME }} interacts with Nuxt's routing, which is important if you are migrating an existing application. If you just created a new nuxt app, you can jump to [Running Locally](#section_running_locally) and come back to these sections later.
150-
The XDN supports Nuxt.js's built-in routing scheme. The default `routes.js` file created by `xdn init` sends all requests to Nuxt.js via a fallback route:
150+
{{ PRODUCT_NAME }} supports Nuxt.js's built-in routing scheme. The default `routes.js` file created by `xdn init` sends all requests to Nuxt.js via a fallback route:
151151

152152
```js
153153
// This file was automatically added by xdn deploy.
@@ -262,11 +262,11 @@ The `Prefetch` component fetches data for the linked page from {{ PRODUCT_NAME }
262262

263263
## Static Sites
264264

265-
The XDN supports fully and partially static sites using Nuxt [generate](https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-generate). To deploy a static Nuxt site on {{ PRODUCT_NAME }}, simply set `target: 'static'` in `nuxt.config.js` and run `xdn deploy`. This will run `nuxt build` and `nuxt generate` to generate a static version of your site.
265+
{{ PRODUCT_NAME }} supports fully and partially static sites using Nuxt [generate](https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-generate). To deploy a static Nuxt site on {{ PRODUCT_NAME }}, simply set `target: 'static'` in `nuxt.config.js` and run `xdn deploy`. This will run `nuxt build` and `nuxt generate` to generate a static version of your site.
266266

267267
### Incremental Static Rendering (ISG)
268268

269-
By default, requests for any pages that are not statically rendered at build time will fall back to server side rendering. If you use the {{ PRODUCT_NAME }} router to cache pages that are not statically rendered, the first user who attempts to access the page will see the fallback HTML page generated by Nuxt (200.html by default). The XDN will render and cache the HTML in the background so that subsequent visits result in a full HTML response. This behavior is similar to Next.js incremental static rendering (ISG). Here is an example route that adds caching for a partially static page:
269+
By default, requests for any pages that are not statically rendered at build time will fall back to server side rendering. If you use the {{ PRODUCT_NAME }} router to cache pages that are not statically rendered, the first user who attempts to access the page will see the fallback HTML page generated by Nuxt (200.html by default). {{ PRODUCT_NAME }} will render and cache the HTML in the background so that subsequent visits result in a full HTML response. This behavior is similar to Next.js incremental static rendering (ISG). Here is an example route that adds caching for a partially static page:
270270

271271
```js
272272
import { Router } from '{{ PACKAGE_NAME }}/core/router'
@@ -278,7 +278,7 @@ export default new Router()
278278
edge: {
279279
// Requests for product pages that are not statically generated will fall back to SSR.
280280
// The first user will see the 200.html loading page generated by Nuxt.
281-
// The XDN will render full HTML response in the background and cache it for one hour at the edge.
281+
// {{ PRODUCT_NAME }} will render full HTML response in the background and cache it for one hour at the edge.
282282
// All future requests to the page will result in the full HTML response.
283283
maxAgeSeconds: 60 * 60 * 24,
284284
staleWhileRevalidateSeconds: 60 * 60, // continue to serve stale responses from the edge cache while refreshing via SSR in the background
@@ -290,7 +290,7 @@ export default new Router()
290290

291291
### Rendering a 404 Page
292292

293-
If you set the `fallback` property in the [generate](https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-generate/#fallback) config to `true`, Nuxt.js will generate a 404.html page that will be served whenever the URL does not match a static page. The XDN will send a 404 http status for these URLs. Note that if you set the fallback property to a string, Nuxt will generate a fallback page with that name, and {{ PRODUCT_NAME }} will serve it with a 200 http status when the URL does not match a statically generated page.
293+
If you set the `fallback` property in the [generate](https://nuxtjs.org/docs/2.x/configuration-glossary/configuration-generate/#fallback) config to `true`, Nuxt.js will generate a 404.html page that will be served whenever the URL does not match a static page. {{ PRODUCT_NAME }} will send a 404 http status for these URLs. Note that if you set the fallback property to a string, Nuxt will generate a fallback page with that name, and {{ PRODUCT_NAME }} will serve it with a 200 http status when the URL does not match a statically generated page.
294294

295295
## Running Locally
296296

guides/overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ export default nextJSApp => {
6666

6767
## React, Vue, and Angular
6868

69-
{{ PRODUCT_NAME }} supports the most widely used technologies for building progressive web applications. The XDN CLI automatically detects whether you're using [React (Next.js)](next), [Vue (Nuxt.js)](nuxt), or [Angular](angular) and configures your app accordingly so you can publish your app to the cloud in seconds.
69+
{{ PRODUCT_NAME }} supports the most widely used technologies for building progressive web applications. The {{ PRODUCT_NAME }} CLI automatically detects whether you're using [React (Next.js)](next), [Vue (Nuxt.js)](nuxt), or [Angular](angular) and configures your app accordingly so you can publish your app to the cloud in seconds.

guides/prefetching.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Prefetching
22

3-
The XDN allows you to speed up the user's browsing experience by prefetching pages and API calls that they are likely to need.
3+
{{ PRODUCT_NAME }} allows you to speed up the user's browsing experience by prefetching pages and API calls that they are likely to need.
44

55
![video](https://www.youtube.com/watch?v=lfhSDCNgzfs)
66

@@ -291,7 +291,7 @@ document.addEventListener('DOMContentLoaded', function() {
291291

292292
## GraphQL
293293

294-
The XDN also enables caching and prefetching of GraphQL requests via a middleware for [Apollo](https://www.apollographql.com/apollo-client). To enable prefetching of GraphQL queries in both the edge and the service worker:
294+
{{ PRODUCT_NAME }} also enables caching and prefetching of GraphQL requests via a middleware for [Apollo](https://www.apollographql.com/apollo-client). To enable prefetching of GraphQL queries in both the edge and the service worker:
295295

296296
1. Ensure that your GraphQL API is configured to accept GET requests. The Apollo client uses POST requests by default, but the Apollo server [automatically accepts both GETs and POSTs](https://www.apollographql.com/docs/apollo-server/v1/requests/). We use GETs instead of POSTs for two reasons:
297297

@@ -336,7 +336,7 @@ module.exports = new Router().get('/graphql', ({ cache, removeUpstreamResponseHe
336336
},
337337
})
338338

339-
// Some APIs, like Shopify, attempt to establish a session by setting a cookie. The XDN will
339+
// Some APIs, like Shopify, attempt to establish a session by setting a cookie. {{ PRODUCT_NAME }} will
340340
// not cache responses with a set-cookie header, so we remove it before attempting to write
341341
// the response to the cache
342342
removeUpstreamResponseHeader('set-cookie')

0 commit comments

Comments
 (0)