You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: guides/angular.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ To prepare your Angular application for deployment on {{ PRODUCT_NAME }}:
54
54
#### 1. Install {{ PRODUCT_NAME }} CLI globally:
55
55
56
56
```bash
57
-
npm install -g @xdn/cli
57
+
npm install -g {{ PACKAGE_NAME }}/cli
58
58
```
59
59
60
60
#### 2. Run the following in the root folder of your project. This will configure your project for {{ PRODUCT_NAME }}.
@@ -65,9 +65,9 @@ xdn init
65
65
66
66
This will automatically add all of the required dependencies and files to your project. These include:
67
67
68
-
- The `@xdn/core` package
69
-
- The `@xdn/angular` package
70
-
- The `@xdn/cli` package
68
+
- The `{{ PACKAGE_NAME }}/core` package
69
+
- The `{{ PACKAGE_NAME }}/angular` package
70
+
- The `{{ PACKAGE_NAME }}/cli` package
71
71
-`xdn.config.js`- Contains various configuration options for {{ PRODUCT_NAME }}.
72
72
-`routes.js` - A default routes file that sends all requests to the Angular Universal server. Update this file to add caching or proxy some URLs to a different origin.
73
73
@@ -83,8 +83,8 @@ The default `routes.js` file created by `xdn init` sends all requests to Angular
83
83
// This file was automatically added by xdn deploy.
Copy file name to clipboardExpand all lines: guides/connectors.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Connectors
2
2
3
-
Connector packages help build and run your app within the XDN. When you run `xdn init`, the XDN CLI detects the framework used by your app and installs the corresponding connector package. For example, if you use Next.js, `@xdn/next` will be installed. If no connector package exists for the framework that you use, you can still deploy to the XDN by implementing the connector interface directly in your app.
3
+
Connector packages help build and run your app within the XDN. When you run `xdn init`, the XDN CLI detects the framework used by your app and installs the corresponding connector package. For example, if you use Next.js, `{{ PACKAGE_NAME }}/next` will be installed. If no connector package exists for the framework that you use, you can still deploy to the XDN by implementing the connector interface directly in your app.
@@ -57,14 +57,14 @@ Additional files can be added beyond the ones listed above. They will be copied
57
57
58
58
## dev.js
59
59
60
-
Called when the user runs `xdn dev`. This entry point is responsible for starting the user's application in development mode. The `@xdn/core` library provides a `createDevServer` function to help with this.
60
+
Called when the user runs `xdn dev`. This entry point is responsible for starting the user's application in development mode. The `{{ PACKAGE_NAME }}/core` library provides a `createDevServer` function to help with this.
61
61
62
62
_Optional, if not provided, xdn dev will simply start the XDN in local development mode, but will not start a framework application server._
Exports a function that is called when you run `xdn build`. It is responsible for constructing the bundle that is deployed to the XDN cloud. This function typically uses `@xdn/core/deploy/DeploymentBuilder` to stage the exploded bundle in the `.xdn` directory.
90
+
Exports a function that is called when you run `xdn build`. It is responsible for constructing the bundle that is deployed to the XDN cloud. This function typically uses `{{ PACKAGE_NAME }}/core/deploy/DeploymentBuilder` to stage the exploded bundle in the `.xdn` directory.
91
91
92
92
_Optional, and not needed in most cases. The xdn build command automatically creates a bundle that includes all static assets referenced in your routes file as well as the `prod` entry point mentioned above._
This hybrid of static and dynamic rendering was first introduced in Next.js as [Incremental Static Generation (ISG)](https://nextjs.org/docs/basic-features/data-fetching#the-fallback-key-required). In Next.js apps, developers enable this behavior by returning `fallback: true` from
250
-
`getStaticPaths()`. The `@xdn/next` package automatically configures the routes for ISG pages to use `onNotFound` and `loadingPage`.
250
+
`getStaticPaths()`. The `{{ PACKAGE_NAME }}/next` package automatically configures the routes for ISG pages to use `onNotFound` and `loadingPage`.
Copy file name to clipboardExpand all lines: guides/core_web_vitals.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ Instead of relying solely on Google Search Console, we recommend tracking Core W
27
27
28
28
## Installation
29
29
30
-
In order to start tracking Core Web Vitals on {{ PRODUCT_NAME }}, you need add the `@xdn/rum` client library to your application. There are a number of ways to do this:
30
+
In order to start tracking Core Web Vitals on {{ PRODUCT_NAME }}, you need add the `{{ PACKAGE_NAME }}/rum` client library to your application. There are a number of ways to do this:
31
31
32
32
### Script Tag
33
33
@@ -67,19 +67,19 @@ To add Core Web Vitals tracking via a script tag, add the following to each page
67
67
To install the Core Web Vitals library using npm, run:
68
68
69
69
```
70
-
npm install --save @xdn/rum
70
+
npm install --save {{ PACKAGE_NAME }}/rum
71
71
```
72
72
73
73
Or, using yarn:
74
74
75
75
```
76
-
yarn add @xdn/rum
76
+
yarn add {{ PACKAGE_NAME }}/rum
77
77
```
78
78
79
79
Then, add the following to your application's browser bundle:
80
80
81
81
```js
82
-
import { Metrics } from'@xdn/rum'
82
+
import { Metrics } from'{{ PACKAGE_NAME }}/rum'
83
83
84
84
newMetrics({
85
85
token:'your-token-here', // get this from https://moovweb.app
@@ -90,7 +90,7 @@ new Metrics({
90
90
91
91
You can tie URLs to pages templates by providing an optional `router` parameter to `Metrics`.
92
92
93
-
When installing @xdn/rum using a script tag, use:
93
+
When installing {{ PACKAGE_NAME }}/rum using a script tag, use:
94
94
95
95
```js
96
96
newXDN.Metrics({
@@ -105,11 +105,11 @@ new XDN.Metrics({
105
105
}).collect()
106
106
```
107
107
108
-
When installing @xdn/rum via NPM or Yarn use:
108
+
When installing {{ PACKAGE_NAME }}/rum via NPM or Yarn use:
The above assumes that the workspace folder is your app's root directory. If that is not the case, adjust `program` and `cwd` accordingly. The `program` config should always point to `@xdn/cli`. The `cwd` config should point to the root directory of your app.
26
+
The above assumes that the workspace folder is your app's root directory. If that is not the case, adjust `program` and `cwd` accordingly. The `program` config should always point to `{{ PACKAGE_NAME }}/cli`. The `cwd` config should point to the root directory of your app.
27
27
28
28
Note that this configuration will allow you to set breakpoints in both your XDN router as well as your application code (for example in Next.js, Nuxt.js, Angular, etc...).
29
29
30
30
## Cloud
31
31
32
32
Your main tool in debugging XDN appplications that have been deployed are two sources of logs:
33
33
34
-
*[Server logs](/guides/logs#section_server_logs)
35
-
*[Access logs](/guides/logs#section_access_logs)
34
+
-[Server logs](/guides/logs#section_server_logs)
35
+
-[Access logs](/guides/logs#section_access_logs)
36
36
37
37
Server logs will capture the output of your serverless in real time while access logs have complete traffic that is being served by your site including all the traffic that never reaches your serverless (e.g. cache hits, static assets, requests routed to custom backends, edge redirects, and so on).
0 commit comments